This project was my first university programming assignment. This made part of the CPS1011: Programming Principles in C course, forming part of my B.Sc. in Computer Science.
In this project, the following tasks were performed:
-
Array Operations:
-
Cloning
functionality was made possible for 3D integer arrays having any size. -
Reversing
functionality was implemented to reverse the order of words in a given array of strings. Eg:{"This is the first sentence", "and this is the second"} becomes {"sentence first the is This", "second the is this and"}
-
-
Tuple Operations:
-
Creation
of new tuples, as identified by a string ID and a sequence of element type/value (In the case of an existing identfier, the new tuple replaces the existing one). -
Tuple Retrieval
of a tuple object pointer, given its ID. -
Tuple ID Retrieval
of an existing tuple object, given its pointer. -
Display
of a tuple's contents, given its pointer. -
Deletion
of tuple object, given its ID. -
Comparison
of 2 compatible tuple objects1, by performing in-order element comparison of their elements, and returning a:- +1 if the first non-equal element pair is larger for the first tuple.
- -1 if the first non-equal element pair is smaller for the first tuple.
- 0 if all elements are equal.
1 Compatible tuples are those with the same element number and types, or where the element number/types of the first is a prefix of the second. ↩
-
Joining
of 2 tuples, given the 2 pointers of tuples to be joined and a new tuple ID. -
Saving
of all existing tuple objects to disk. -
Loading
of all tuple objects from a saved file.
-
A report describing the design process and motivation behind this project can be found here.
A detailed technical documentation of the source code written can be found here.