Question: To write a program that implements the following C++ concepts 1. Data Encapsulation 2. Instantiate classes 3. Composition Class 4. Aggregation Class 5. Dynamic Memory

To write a program that implements the following C++ concepts 1. Data Encapsulation 2. Instantiate classes 3. Composition Class 4. Aggregation Class 5. Dynamic Memory 6. File Stream

Make a program that reads a file and can generate reports. Each file will have phone calls records (see section 4). The program will process the data gathering all minutes and total amount for each report. The program should have a menu (see section 1): 1. New Report this option will ask a file name (TE??????.tel). This option will instantiate an object of Report class, loading the whole file into memory. 2. Delete a report this option will display all reports available in memory and ask which one you would like to delete. 3. Display a report this option will display all reports available in memory and ask you which one you would like to generate a report. 4. Exit Program ends. For option 1, you do not know how many reports are, meaning that you will create dynamically the reports. For long distance calls the formula will be (minutes call x $1.50). For local phone calls the formula will be (minutes call x $0.25). Section 1 Reports Menu Reports 1. New report 2. Delete a report 3. Display a report 4. Exit Section 2 Diagram: Section 3 Classes layouts This program will have four classes: 1. Person string firstName string middleName string lastName string maidenName 2. Data Person client string callDate bool longDistance string timeCallBegin string timeCallEnd string callNoFrom string callNoTo s Person Data Report 3. Report Data * records string fileName int totalRecords float totalMinutes float totalAmount 4. DataParser Data record Each of the classes will have the constructors, destructors, accessors, mutators and operators overloading. Class DataParser will have a constructor that received a String, with the line to be parsed. Section 4

File Layout  To write a program that implements the following C++ concepts 1.

RECORDS SPECIFICATIONS File Format TE????? tel Fields Type Format Length Location specifications Enter the client first name of the company. Left justified and fill with Character 25 blanks. First Name 25 Enter the client middle name of the company. Left justified and fill with Middle Name Character 50 blanks 25 26 Enter the client last name of the company. Left justified and fill with Character 1001 blanks. Last Name 50 51 Enter the client mother's maiden name of the company. Left justified and fill with Maiden Name Character 150 blanks. 50 101 8 151 158 Phone call date. Call Date Character MMDDYYYY 0 local call Long Distance Character 159 1 long distance call 159 Time Call Begin Character HHMMS 6 160 165 Time Call End Character HHMMSS 6 166 171 Call No. From Character 9999999999 181 Area Code (3) Phone No. Character 9999999999 10 182 191 Area Code (3) Phone No. Call No. To 59 192 250 Fill with blanks Blank Character

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!