Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Computer Science C++ Programming I. Application overview You are going to create

ID: 3912915 • Letter: C

Question

Computer Science C++ Programming

I. Application overview You are going to create an application that will run 4 different programs. This program will be driven by a menu screen. The user will be able to choose which program to enter using the menu screen. Also, the user will only be able to exit using the menu screen. II. Application Components A. Welcome Screen Most applications welcome a user before the start of the application. You will create a welcome screen. The figures below are examples of welcome screens. (Note: This is only an example. Your application should look different from the one below) VELCOME TO YOUR PINAL PROGRAH VELCOHE Jason HAY THE COMPUTER MERC ter your first nanet Jason any key to cont inue..- B. Menu This application is driven by a menu. You also should have some sort of error checking. Below is an example of the menu screen: (Note: This is only an example. Your application should look different from the one below) CAUsers 15Documents IP er 18CMPSC 1.. CMPSc * OPTION DESCRIPTION Calculate sales tax on multiple sales items ** Grading Spreadsheet Balance a checkbook Conversion Utility EXIT 4 XEEREORXCEERERX Enter your selection here:_

Explanation / Answer

#include<bits/stdc++.h>

using namespace std;

struct items{

string item;

double price;

};

struct student{

string name;

int quiz1,quiz2,quiz3,quiz4;

};

int main(){

string name;

int choice;

char more;

cout<<"****************************** "

<<"****************************** "

<<"******** WELCOME TO ********** "

<<"******** YOUR FINAL ********* "

<<"********* PROGRAM ********* "

<<"****************************** "

<<"****************************** ";

cout<<"Enter name : ";

cin>>name;

cout<<"****************************** "

<<"****************************** "

<<"******** WELCOME ************** "

<<"******** "<<name <<" ********* "

<<"********* TO PROGRAM ********* "

<<"****************************** "

<<"****************************** ";

do{

cout<<"Options Description 1 Calculate sales tax on multiple sale itema 2 Grading Spreadsheet 3 "<<

"Balance a checkbook 4 Conversion utilty 0 EXIT Enter choice : ";

cin>>choice;

switch(choice){

case 1:{

do{

int count;

double tax,total=0;

cout<<"Enter no of sale items : ";

cin>>count;

struct items arr[count];

for(int i=0;i<count;i++){

cout<<"Enter name of sales item : ";

cin>>arr[i].item;

cout<<"Enter price of "<<arr[i].item<<" : ";

cin>>arr[i].price;

total+=arr[i].price;

}

cout<<"Enter tax sales percentage <enter 10 for 10%> : ";

cin>>tax;

cout<<"Items Price ";

for(int i=0;i<count;i++)

cout<<arr[i].item<<" "<<arr[i].price<<" ";

cout<<"Total sale "<<total<<" ";

cout<<"sales tax "<<(tax*total)/100<<" ";

cout<<"Grand total "<<total+(tax*total)/100<<" ";

cout<<"do you want to run this program again (y/n)? : ";

cin>>more;

}while(more=='y');

break;

}

case 2:{

do{

int count;

double t1=0,t2=0,t3=0,t4=0;

cout<<"Enter no of students : ";

cin>>count;

struct student arr[count];

for(int i=0;i<count;i++){

cout<<"Enter name of student : ";

cin>>arr[i].name;

cout<<"Enter gade for quiz1 of "<<arr[i].name<<" : ";

cin>>arr[i].quiz1;

t1+=arr[i].quiz1;

cout<<"Enter gade for quiz2 of "<<arr[i].name<<" : ";

cin>>arr[i].quiz2;

t2+=arr[i].quiz2;

cout<<"Enter gade for quiz3 of "<<arr[i].name<<" : ";

cin>>arr[i].quiz3;

t3+=arr[i].quiz3;

cout<<"Enter gade for quiz4 of "<<arr[i].name<<" : ";

cin>>arr[i].quiz4;

t4+=arr[i].quiz4;

}

cout<<" Quiz1 Quiz2 Quiz3 Quiz4 Average ";

for(int i=0;i<count;i++){

float avg=(arr[i].quiz1 + arr[i].quiz2 + arr[i].quiz3 + arr[i].quiz4)/4;

cout<<arr[i].name<<" : "<<arr[i].quiz1<<" "<<arr[i].quiz2<<" "

<<arr[i].quiz3<<" "<<arr[i].quiz4<<" "<<avg<<" ";

}

cout<<" Average quiz1 quiz2 quiz3 quiz4 ";

cout<<" "<<t1/count<<" "<<t2/count<<" "<<t3/count<<" "<<t4/count<<" ";

cout<<"do you want to run this program again (y/n)? : ";

cin>>more;

}while(more=='y');

break;

}

case 3:{

int account_number;

double begining_price;

do{cout<<"enter account number and begning balance of checkbook ";

cin>>account_number>>begining_price;

cout<<" Deposits Withdraw Balance ";

//for(int i=0;i<n;i++){

//cout<<Deposits <<Withdraw <<balance<<" ";

//}

cout<<"do you want to run this program again (y/n)? : ";

cin>>more;

}while(more=='y');

break;

}

case 4:{

char c;

string clock_type;

int hour,minute;

string meridian;

do{

cout<<"enter c:civilian m:military ";

cin>>c;

if(c=='c')clock_type="civilian";

else if(c=='m')clock_type="Military";

cout<<"Enter your time in "<<clock_type<<" ";

cout<<"Enter hour : ";

cin>>hour;

cout<<"Enter minute : ";

cin>>minute;

if(c=='c'){

cout<<"Enter either am or pm : ";

cin>>meridian;

cout<<"civilian time : "<<hour<<":"<<minute<<meridian<<" ";

if(meridian =="am"){

if(hour==12)hour=0;}

else if(meridian =="pm"){

if(hour!=12)hour+=12;

}

cout<<"military time : "<<hour<<":"<<minute<<" ";

}

else if(c=='m'){

cout<<"military time : "<<hour<<":"<<minute<<" ";

if(hour>=0&&hour<12)

meridian="am";

else if(hour>=12&&hour<=23){

hour%=12;

meridian="pm";

}

cout<<"civilian time : "<<hour<<":"<<minute<<meridian<<" ";

}

cout<<"do you want to run this program again (y/n)? : ";

cin>>more;

}while(more=='y');

break;

}

case 0:{

choice=0;

break;

}

default:{char c;

cout<<"Invalid Reply ";

cout<<"would you like to re-enter menu <y/n>? : ";

cin>>c;

if(c=='n')choice=0;

break;

}

}

}while(choice!=0);

cout<<" Thank You! Come Again ";

return 0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote