write a program that implements the following C concepts 1 D

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 s 2. Delete a report 3. Display a report 4. Exit Section 2 Diagram: Data Report 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 lon string timeCallBegin string timeCallEnd string callNoFrom string callNoTo

Solution

std::ifstream inFile(\"fruit.txt\"); std::string fruit; std::getline(inFile, fruit); // Stores \'apple\' std::getline(inFile, fruit); // Stores \'banana\' std::getline(inFile, fruit); // Stores \'orange\' std::cout << fruit << std::endl;
write a program that implements the following C++ concepts 1. Data Encapsulation 2. Instantiate classes 3. Composition Class 4. Aggregation Class 5. Dynamic Mem

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site