Computer Science > Research Paper > DeVry University, ChicagoCIS 170CCEIS170 Week 7 Course Project (All)
CEIS170 COURSE PROJECT WEEK 7 Add the ability to save data to disk in one or more files. The menu(s) should give the user the option to save or retrieve data. Examples: In the programming tutorial,... add a tutorial on working with files. Then add the ability to save/retrieve user information or quiz results. CODE: #include <iostream> #include <string> #include <cmath> #include <iomanip> #include <array> #include <fstream> using namespace std; void menu(void); void writeData(void); void readData(void); int main() { ofstream outputFile; outputFile.open("DJ Playlist.txt"); //Variables double lengthOfLoan, amountOfLoan, interestRate, monthlyPayment, loanTotal, totalInterest; char yes; const int INPUT_CUSTOMER = 1, DISPLAY_LOAN = 2, INTEREST_ACQUIRED = 3, TOTAL_LOAN = 4, MONTHS_TO_PAY = 5, EXIT_PROGRAM = 6; string customerName; int choice; //Program cout << "Welcome to the loan Calculator!\n"; cout << "Please make a selection from the list below.\n" << endl; cout << "1.) To Enter Your loan Information." << endl; cout << "2.) To view your Monthly Payments." << endl; cout << "3.) View total amount of interest for the loan." << endl; cout << "4.) Total Amount due." << endl; cout << "5.) View total months remaining on loan." << endl; cout << "6.) Exit the program" << endl; do { cout << "Choose another Menu option. 1, 2, 3, 4, 5, or 6.... "; cin >> choice; while (choice < INPUT_CUSTOMER || choice > EXIT_PROGRAM) { cout << "Please enter a valid menu choice: "; cin >> choice; } if (choice == 1) { cout << "What is the customers name? "; cin >> customerName; cout << "Enter the amount borrowed. $"; cin >> amountOfLoan; cout << "What is the interest rate? % "; cin >> interestRate; cout << "How many months is the loan for? "; [Show More]
Last updated: 1 year ago
Preview 1 out of 3 pages
Instant download
Buy this document to get the full access instantly
Instant Download Access after purchase
Add to cartInstant download
Connected school, study & course
About the document
Uploaded On
Jul 06, 2021
Number of pages
3
Written in
This document has been written for:
Uploaded
Jul 06, 2021
Downloads
0
Views
37
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·