CS120-02, TSU Lab Objectives This lab was designed to reinforce programming concepts from Chapter 3 of C++ Programming: Program Design Including Data Structures, 8th Edition. In this lab you will practice: Input request Arithmetic calculations Formatted output Program 3: School Supply Due on Sunday, 9/25/2022, by 11:59pm Problem Description Supposed you have purchased school supply online for the new school year, but just found out there are still some items to buy. Write a program named Program3_SchoolSupply Your Name.cpp to calculate the payment for the items that you are to order. The following is the list of the items and the unit price. Sharpie fine point permanent marker $4.87/pack $3.60/pack • Classic medium point ball pen • Pencil case with secure zipper closure $10.55/each The sale rate is 8.25%. The number of items to buy should be input by user. Program Requirements The program should 1. request input to get your name 2. request inputs to get the quantity of each item you like to order 3. perform calculations for how much you need to pay for all items you have ordered 4. print the data in the required format, as I showed in the sample output Programming Steps 1. Start from this least C++ program: //Preprocessor directive 2 //Namespace definition 4 int main() 5-{ 7 8} Created by Li Ma return 0; CS120-02, TSU 2. print a program message "This is for Program3 by YourName." first. a. replace YourName with your own names b. add a line break by the end of the message 3. define the following variables and assign values to them: a. markerPrice, penPrice, casePrice, saleRate i. they are all floating-point values, either float type or double type ii. set value to these variables using the information in the problem description 4. ask user to enter the following values a. your name (userName) i. userName is a string, should be defined as string userName; ii. you should use the following statement to request a string getline (cin, userName); iii. it should be the first input request b. the number of packs for permanent marker (markerCount) as integer c. the number of packs for ball pen (penCount) as integer d. the number of pencil case (caseCount) as integer 5. calculate the payment (Payment), which is a floating-point value payment = (markerCount marker Price + penCount penPrice + caseCount casePrice) = (1 + saleRate) 6. display an output report like the following sample output: User's name: Sale rate: Number of permanent markers: Number of ball pen: Number of pencil case: Amount to pay: Note: there are three (3) columns $ Created by Li Ma Li Ma 8.25% 2 3 1 33.65 i. the left column is left aligned ii. the right column is right aligned iii. the dollar sign in the last row is in the middle column 7. format the output using manipulators, not just using white spaces or tab spaces. You may use the following manipulators a. endl, fixed, showpoint, right, left, and setw()
CS120-02, TSU Lab Objectives This lab was designed to reinforce programming concepts from Chapter 3 of C++ Programming: Program Design Including Data Structures, 8th Edition. In this lab you will practice: Input request Arithmetic calculations Formatted output Program 3: School Supply Due on Sunday, 9/25/2022, by 11:59pm Problem Description Supposed you have purchased school supply online for the new school year, but just found out there are still some items to buy. Write a program named Program3_SchoolSupply Your Name.cpp to calculate the payment for the items that you are to order. The following is the list of the items and the unit price. Sharpie fine point permanent marker $4.87/pack $3.60/pack • Classic medium point ball pen • Pencil case with secure zipper closure $10.55/each The sale rate is 8.25%. The number of items to buy should be input by user. Program Requirements The program should 1. request input to get your name 2. request inputs to get the quantity of each item you like to order 3. perform calculations for how much you need to pay for all items you have ordered 4. print the data in the required format, as I showed in the sample output Programming Steps 1. Start from this least C++ program: //Preprocessor directive 2 //Namespace definition 4 int main() 5-{ 7 8} Created by Li Ma return 0; CS120-02, TSU 2. print a program message "This is for Program3 by YourName." first. a. replace YourName with your own names b. add a line break by the end of the message 3. define the following variables and assign values to them: a. markerPrice, penPrice, casePrice, saleRate i. they are all floating-point values, either float type or double type ii. set value to these variables using the information in the problem description 4. ask user to enter the following values a. your name (userName) i. userName is a string, should be defined as string userName; ii. you should use the following statement to request a string getline (cin, userName); iii. it should be the first input request b. the number of packs for permanent marker (markerCount) as integer c. the number of packs for ball pen (penCount) as integer d. the number of pencil case (caseCount) as integer 5. calculate the payment (Payment), which is a floating-point value payment = (markerCount marker Price + penCount penPrice + caseCount casePrice) = (1 + saleRate) 6. display an output report like the following sample output: User's name: Sale rate: Number of permanent markers: Number of ball pen: Number of pencil case: Amount to pay: Note: there are three (3) columns $ Created by Li Ma Li Ma 8.25% 2 3 1 33.65 i. the left column is left aligned ii. the right column is right aligned iii. the dollar sign in the last row is in the middle column 7. format the output using manipulators, not just using white spaces or tab spaces. You may use the following manipulators a. endl, fixed, showpoint, right, left, and setw()
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
Please I need help to get this homework done, I am not sure how to build the program correctly.
Expert Solution
Step 1
The complete C++ code is given below with code and output screenshot
Happy to help ?
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education