Question

Create the following class in C++ Create a new class call Date. Date will contain the...

Create the following class in C++

Create a new class call Date. Date will contain the date stored as day of the month, month and the year. Provide appropriate set and get methods for the class. Use doxygen comments to document Date.h (Date specification).

Think about how the class will be used. Modify the input data file to cater for dates. The date in the data file refers to when the mark for the unit was obtained. Unit test the date class.

Result will now contain a date. The output* operator for Result should output the unit information, the marks and the date these marks were obtained. The output for registration in the output data file will contain the Student ID, Semester, unit information, date and marks for each unit. The output should be in a similar format as the output in the previous exercise except it will have the date information as well and there will be no “_” in the unit name. A sample run is shown at the end.

*“Output” does not mean that the object will drag out the internal data of nested objects. The nested objects will be asked to output themselves. The containers do not micro-manage the details of nested objects. Micro-managing creates dependencies and increases coupling.

Ignore doxygen style comments

Homework Answers

Answer #1

Program :

Output :

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Complete this in C++ and explain what is being done. 1      Introduction The functions in the...
Complete this in C++ and explain what is being done. 1      Introduction The functions in the following subsections can all go in one big file called pointerpractice.cpp. 1.1     Basics Write a function, int square 1(int∗ p), that takes a pointer to an int and returns the square of the int that it points to. Write a function, void square 2(int∗ p), that takes a pointer to an int and replaces that int (the one pointed to by p) with its...
Using the following code perform ALL of the tasks below in C++: ------------------------------------------------------------------------------------------------------------------------------------------- Implementation: Overload input...
Using the following code perform ALL of the tasks below in C++: ------------------------------------------------------------------------------------------------------------------------------------------- Implementation: Overload input operator>> a bigint in the following manner: Read in any number of digits [0-9] until a semi colon ";" is encountered. The number may span over multiple lines. You can assume the input is valid. Overload the operator+ so that it adds two bigint together. Overload the subscript operator[]. It should return the i-th digit, where i is the 10^i position. So the first...
Strings The example program below, with a few notes following, shows how strings work in C++....
Strings The example program below, with a few notes following, shows how strings work in C++. Example 1: #include <iostream> using namespace std; int main() { string s="eggplant"; string t="okra"; cout<<s[2]<<endl; cout<< s.length()<<endl; ​//prints 8 cout<<s.substr(1,4)<<endl; ​//prints ggpl...kind of like a slice, but the second num is the length of the piece cout<<s+t<<endl; //concatenates: prints eggplantokra cout<<s+"a"<<endl; cout<<s.append("a")<<endl; ​//prints eggplanta: see Note 1 below //cout<<s.append(t[1])<<endl; ​//an error; see Note 1 cout<<s.append(t.substr(1,1))<<endl; ​//prints eggplantak; see Note 1 cout<<s.find("gg")<<endl; if (s.find("gg")!=-1) cout<<"found...
this is the book name. Data Structures and Abstractions with Java 1) Description: The sample programs...
this is the book name. Data Structures and Abstractions with Java 1) Description: The sample programs in Chapter 1 of your textbook are not complete. They are used for illustration purpose only. The implementation of Listing 1-1 on page 39 is explained in Chapter 2. And, in order to see the result of using it, we will need the following set of files: i. BagInteface.java – the specification only. ii. ArrayBag.java – the implementation of BagInerface.java. iii. ArrayBagDemo.java – a...
INTELLECTUAL PROPERTY  Industrial property forms part of the broader concept of "intellectual property."  The...
INTELLECTUAL PROPERTY  Industrial property forms part of the broader concept of "intellectual property."  The objects of intellectual property are the creations of the human mind, the human intellect hence the expression "intellectual" property.  In a somewhat simplified way, one can state that intellectual property relates to pieces of information which can be incorporated in tangible objects at the same time in an unlimited number of copies at different locations anywhere in the world.  The property is...