6. int main(void)
{
// variable declaration section
char selection = ' ';
Employee employee1;
//Initialize employee1 members
employee1.setEmpName("John Smith");
employee1.setEmpAddress("1235 Main Street");
employee1.setEmpEmail("[email protected]");
employee1.setEmpVacationDays(12);
//display employee name
cout << "Hello "+ employee1.getEmpName() << endl;
do
7. {
// display menu
displayMenu(&employee1);
// read user selection
cin>>selection;
switch(selection)
{
case '1':
cout<< "View My Address is selected" << endl;
viewAddress(&employee1);
break;
case '2':
cout<< "View My Email Address is selected" <<
endl;
viewEmail(&employee1);
break;
case '3':
8. cout<< "View Vacation Days Taken is selected"
<< endl;
cout << "You have taken " <<
vacationDays(&employee1) << " days!!" << endl;
break;
case 'X' :
case 'x':
cout<<"Thank you!!!" << endl;
break;
// other than 1, 2, 3 and X...
default : cout<<"Invalid selection. Please try again";
// no break in the default case
}
cout<<endl<<endl;
} while (selection!= 'X' && selection != 'x');
return 0;
}
9. In this assignment, continue working on the project that you
started in Week1 according to the following details. You will
design and implement at least 3 functions to allow customers to
select products and quantities and to print the order summary
(including the total price). You may use the sample code
as the template.
· Create a new C++ empty project titled
"CS115_IP2_YourName" in the IDE.
· Determine the functions that you need to create (you need at
least 3).
· Design and implement those functions in the IDE.
· Your program should provide the following additional
functionality (in addition to the functionality provided in
Week1):
· Ask customers to select multiple products and quantities
· Print the order summary, including the products, the
quantities, and the total price for each product
· Calculate and print the total price for the order
· Compile and run the application to demonstrate a working
program.
· Insert the screenshots into a Word document, and add a short
explanation on each screenshot.
Finally, save your Word document as “yourname_IP2.docx”.
Click the “Edit” button on this submission node to submit the
saved document.
#
Description
Attachment
1
Unit 2 Submission
only accept: doc, docx
No attachment
Edit
10. one attempt
Check
Screen shots/Output
After name input, the program requires the user to selection a
product from the menu.
When a user selects a product which is not available, he/she is
requested to try again.
When a user selects a product, the program calculates and
displays summary.
When user selects exit, the program displays total and exits.
Use an IDE such as Visual Studio or Eclipse for C++ to produce
this assignment. In this assignment, you will create an
application to select the products to sell. You may use the
sample code as the template. Use the following steps to guide
your programming work:
· Create a new C++ empty project titled
"CS115_IP1_YourName" in the IDE.
· Ask customers to enter details such as their names and
addresses.
· Print a welcome message that includes the customer's name.
· Provide a list of available products that allow customers to
11. select.
· Print the selected product or “Thank you” if Exit is selected,
and exit the program.
· If an invalid selection is made, ask the customer to try again.
· Compile and run the application to demonstrate a working
program.
· Take screenshots to show your code, successful compile, and
successful run. Click here for how to make a screenshot on a PC
or here on a Mac.
· Insert the screenshots into a Word document, and add a short
explanation on each screenshot.
Finally, save your Word document as “yourname_IP1.docx”.
Click the “Edit” button on this submission node to submit the
saved document.
Please follow the instructions in the task that I have provided
exactly. This is a rudimentary C++ assignment and I does not
require a lot of work. Please write the program, compile it and
run. I require a copy of the successfully compiled and tested
program. I have provided the sample code. Thank you.