class and struct
$30-60 USD
Paid on delivery
b) Create a file Entry.h that contains the new Name class and the Date and Entry classes. Write a main program that includes Entry.h. The main program should prompt the user to enter three Entries, and the program should read Entries from standard input and write them to the file EntryBook.txt. Turn in the files Entry.h, [url removed, login to view], and [url removed, login to view] a) Recall the Name struct, and the associated readName and writeName functions. Re-write this so that Name is a class, with the first name and last name as private member data, and the readName and writeName functions as public member functions. Here's the notes: struct Name { string first; string last; }; struct Date { int day; int month; int year; }; struct Entry { Name name; // Name is a struct Date bday; // Date is a struct }; void readName(istream &ist,Name &theName) { cout << "Last name: "; ist >> [url removed, login to view]; cout << "First name: "; ist >> [url removed, login to view]; } void readDate(istream &ist,Date &theDate) { cout << "Month: "; ist >> [url removed, login to view]; cout << "Day: "; ist >> [url removed, login to view]; cout << "Year: "; ist >> [url removed, login to view]; } void readEntry(istream &ist,Entry &e) { readName(ist,[url removed, login to view]); readDate(ist,[url removed, login to view]); }
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Project ID: #2830238