#include
#include
using namespace std;
struct customer{ //customer structure datatype
string name, address, city, state, zip, telephone, date;
int balance;
};
void setCustomer(customer&); //inputs customer data from user
void getCustomer(customer); //prints customer data to the screen
int main()
{
int size,action=1;
cout<<"-+- Customer Manager -+-\nHow many customers?:\t";
cin>>size;
customer*database=new customer[size];
cout<<"\n --- Created database of "< while(action!=0){ //Menu Interface Loop cout<<"-+- Menu -+-\n 0: Quit\n 1: Set a customer's
information\n 2: Display a customer's information\n\n>"; cin>>action; cout< switch(action){ case 1:{ int cnum; cout<<"customers:\n"; for(int x=0;x cout< cout<<"\ncustomer number to change:\t"; cin>>cnum; if(cnum<=size && cnum>0) setCustomer(database[cnum-1]); else cout<<"\ninvalid customer number!\n\n"; } break; case 2:{ int cnum; cout<<"customers:\n"; for(int x=0;x cout< cout<<"\ncustomer number to display:\t"; cin>>cnum; if(cnum<=size && cnum>0) getCustomer(database[cnum-1]); else cout<<"\ninvalid customer number!\n\n"; } break; default: break; } } delete[] database; return 0; } void setCustomer(customer&set) { cout<<"Enter Data for the Customer:\nName:\t\t\t"; cin>>set.name; cout<<"Address:\t\t"; cin.ignore(256,'\n'); getline(cin, set.address); cout<<"City:\t\t\t"; cin>>set.city; cout<<"State:\t\t\t"; cin>>set.state; cout<<"Zip Code:\t\t"; cin>>set.zip; cout<<"Telephone Number:\t"; cin>>set.telephone; cout<<"Date of last Payment:\t"; cin>>set.date; do{ cout<<"Account Balance:\t"; cin>>set.balance; if(set.balance<0) cout<<"Invalid Balance!\n"; }while(set.balance<0); //data validation } void getCustomer(customer get) { cout<<"\n --- Data for "< cout<<"\nAddress:\t"< cout<<"\nTelephone:\t"< cout<<"\nLast Payment:\t"< cout<<"\nAccount
balance:\t"< }
Write a program that uses a structure to store the following data about a customer account: Name Address City, sta...
Write a program that keeps track of a speakers’ bureau. The program should use a structure to store the following data about a speaker: (this is in C++) Name Telephone Number Speaking Topic Fee Required The program should use a vector of structures. It should let the user enter data into the vector, change the contents of any element, and display all the data stored in the vector. The program should have a menu-driven user interface. Input Validation: When the...
Write a program (C++) that shows Game sales. The program should use a structure to store the following data about the Game sale: Game company Type of Game (Action, Adventure, Sports etc.) Year of Sale Sale Price The program should use an array of at least 3 structures (3 variables of the same structure). It should let the user enter data into the array, change the contents of any element and display the data stored in the array. The program...
Customer Accounts This program should be designed and written by a team of students. Here are some suggestions: Write a program that uses a structure to store the following information about a customer account: • Name • Address • City, state, and ZIP • Telephone number • Account balance • Date of last payment The structure should be used to store customer account records in a file. The program should have a menu that lets the user perform the following...
I need help with this code. I'm using C++ and Myprogramming lab to execute it. 11.7: Customer Accounts Write a program that uses a structure to store the following data about a customer account: Customer name Customer address City State ZIP code Telephone Account balance Date of last payment The program should use an array of at least 20 structures. It should let the user enter data into the array, change the contents of any element, and display all the...
please write in C++ Write a program that uses a structure to store the following inventory data in a file: The data can be either read from a text file or the keyboard Item name (string) Quantity on hand(int) Wholesale cost(double) Retail Cost(double) The program should have a menu that allows the user to perform the following tasks: Add new records to the file Display any record in the file User will provide the name of the item or the...
Inventory Program (C++) Write a program that uses a structure to store the following inventory data in a file: - Item Description -Quantity on Hand -Wholesale cost -Retail cost -Date Added to Inventory The program should have a menu that allows the user to perform the following tasks: -Add new records to file -Display any record in the file -Change any record in the file Input Validation: The program should not accept quantities, or wholesale or retail costs, less than...
Write a C program Design a program that uses an array to store 10 randomly generated integer numbers in the range from 1 to 50. The program should first generate random numbers and save these numbers into the array. It will then provide the following menu options to the user: Display 10 random numbers stored in the array Compute and display the largest number in the array Compute and display the average value of all numbers Exit The options 2...
Write a code using python to make an Agenda that can store values such as Name, Address and Phone number of 10 digits Name format First, Last Address Format Street, Number Zip City ST. Country phone format (###) ###-#### This program should give the option of adding a new contact or Display all the contacts you have stored by typing New Contact or Display Contacts
Need a program in python. Asterix and Obelix want to store and process information about movies they are interested in. So, you have been commissioned to write a program in Python to automate this. Since they are not very computer literate, your program must be easy for them to use. They want to store the information in a comma separated text file. Using this they would need to generate a report – see all items AND show a bar chart...
in java (Bank Account) Write a program that inputs in the full name, street address, city, state, zip code, and social security for new account. In addition, it inputs in the initial account balance and allows the owner of the new account to make one withdrawal followed by one deposit. Your program should calculate the ending balancing after the withdrawal and deposit made by the account holder. It should also find the count of each one of these bills $78,...