Awarded

C++ Programming Job by beatbox123

you are required to develop a program that reads in and process some ‘messy’ records from a file that contains data meant for different kinds of classes. These data are jumbled up and unsorted, and to make it worse, for any particular row of record, there may be multiple duplicates scattered over the entire file!

You program should posses the following capabilities:

a) read in the records from a user-specified filename

b) remove all duplicate rows of data

c) filter and display the data according to user-specified sorting criteria

d) store the records displayed in c), in a user-specified filename

The next section provides information about the requirements for developing this program.

Task Requirements

A) Appendix A provides a sample input data from a file called ‘messy.txt’. It contains information meant to be stored in 4 classes: ‘Point2D’, ‘Point3D’, ‘Line2D’ and ‘Line3D’. Please refer to the table in Appendix A for a description of the format in which the input data for each of the classes is stored.

B) Note1: To read in data, you are required to create your own input manipulator(s) to extract the input filename from user, and/or determining which of the 4 classes (mentioned above) the record is meant for.

After the relevant input file stream has been established, you are further required to overload the extraction operator ‘>>’, for each of the 4 classes, to support the process of extracting data from file stream and storing it into the relevant object.

C) Note2: You are to research and determine which kind of STL containers (e.g. Map, Vector, Set, Lists etc) you should use, to store all the various objects from the 4 classes. you are not allowed to use array [ ] to store any of your data!



D) Appendix B provides a description of the 4 classes: ‘Point2D’, ‘Point3D’, ‘Line2D’ and ‘Line3D’, and the relationships between them. You are to study the diagrams and implement them accordingly.

E) Appendix C provides the sample output format and a description of the format requirements, for each of the 4 classes. These format are to be applied whether the data from these classes are output to a file or terminal.

F) Note3: To output data, you are required to create your own output manipulator(s) to display/store data in the format described in Appendix C. You are further required to overload the insertion operator ‘<<’, for each of the 4 classes, to support the process of inserting data to the terminal, or the relevant file stream.

G) Note4: All output data must not contain any duplicates! There are many approaches to solving this problem. Firstly, you could check for, and remove duplicate records at the point of reading in the input. Alternatively, you could temporarily store the data in a STL container, research and make use of any STL algorithm to search for, and remove the duplicates. Another (inefficient) way is to store everything in STL container, but your program needs to ensure that when user wishes to see / store the records in a file, no duplicate records are shown.

H) Appendix D provides a description of 5 generic template functions that you are supposed to develop. These ‘utility’ functions plays a supporting role, and they should be developed in a separate header file called ‘MyTemplates.h’.

I) Your program should allow user specify the filtering criteria so that user can specify which set of records he wishes to view / store. Your program should allow the following options:

i) Point2D records <= default selected option

ii) Point3D records

iii) Line2D records

iv) Line3D records

J) Your program should allow user to specify the sorting criteria so that user can specify which attributes (of a set of records) to order the data by. The sorting criteria is based on the current filtering criteria.

For example, if the current filtering criteria is ‘Only Point2D records’, your program should restrict user to the options of sorting the data by ‘x’, ‘y’ & scalar value ‘distFrOrigin’ only!

Skills: C++ Programming

See more: vector template example, vector template, vector stl, vector remove, vector order, vector map program, vector containers, user diagrams, template stl, template container, template algorithm, study algorithm, stl vector map, stl vector example, stl vector, stl template, stl sorting, stl set example, stl set, stl search, stl sample, stl map sample, stl map example, stl map container, stl map

About the Employer:
( 0 reviews ) Singapore

Project ID: #1303515

1 freelancer is bidding on average $30 for this job

dobreiiita

Hired by the Employer

$30 USD in 1 day
(152 Reviews)
6.2