(1) Create three files to submit: - IternToPyrchaseh - Class declaration - ltem ToPurchase cpp-Class defintion - main.cp

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

(1) Create three files to submit: - IternToPyrchaseh - Class declaration - ltem ToPurchase cpp-Class defintion - main.cp

Post by answerhappygod »

1 Create Three Files To Submit Iterntopyrchaseh Class Declaration Ltem Topurchase Cpp Class Defintion Main Cp 1
1 Create Three Files To Submit Iterntopyrchaseh Class Declaration Ltem Topurchase Cpp Class Defintion Main Cp 1 (33.78 KiB) Viewed 38 times
1 Create Three Files To Submit Iterntopyrchaseh Class Declaration Ltem Topurchase Cpp Class Defintion Main Cp 2
1 Create Three Files To Submit Iterntopyrchaseh Class Declaration Ltem Topurchase Cpp Class Defintion Main Cp 2 (36.75 KiB) Viewed 38 times
(1) Create three files to submit: - IternToPyrchaseh - Class declaration - ltem ToPurchase cpp-Class defintion - main.cpp - main0 function Euld the Item ToPurchase class with the following specifications: - Default constructor - Public class functions (mutators \& accessors) - SetName0 \& GetNamed (2 pts) - SetPrice0 \& GetPrice0 (2 pts) - SetQuantity0 \& GetQuantity0 (2 pts) - Private data mermbers - string itemName - Initialized in default constructor to "none" o int itemPrice - Initialized in default constructor to 0 a int itemQuantity - Initialized in default constructor to 0 (2) In main0. prompt the user for two items and create two objects of the ltemToPurchase class. Before prompting for the second item, call cin.ignore0 to allow the user to input a new string (2 pts) EXi​ Item 1 Enter the item name: Chocolate Chips Enter the 1 tem price: 3 Enter the item quanticy: 1 Item 2 Enter the iten name:
Item 2 Enter the item name: Bottled Water Enter the item price: 1 Enter the item quantity: 10 (3) Add the costs of the two items together and output the total cost. (2 pts) EX: TOTAL COST Chocolate Chips 1 @ $3=$3 Bottled Nater 10 e $1=$10 Total: $13 4059842277067 areron \begin{tabular}{|l|l} LAB & 24.21.1: LAB*: Program: Online shopping cart (Part 1) \end{tabular} Current file: main.cpp ₹ 1. #include h " 6 int main() \{ 6 int mainO \{ 7 8 * Type your code here */ 8 9 11 return 0
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply