[SOLVED] CSE1342 Labquiz 6: Online Shopping Cart (C++)

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab-6-hdl2sz.zip (116.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

(1) Create three files to submit:

  • ItemToPurchase.h – Class declaration
  • ItemToPurchase.cpp – Class definition
  • main.cpp – main() function

Build the ItemTopurchase class with the following specifications:

  • Default constructor
  • Public Class functions (mutators accessors)
  • SetName() & GetName() (2 pts)

SetPnce() GetPrice0 (2 pts)

  • SetQuantity() & GetQuantity() (2 pts)
  • Private data members

string item Name Initialized in default constructor to β€’none”

  • int itemprice – Initialized in default constructor to O
  • int iternQuantity β€’ Initialized in default constructor to O

(2) In main (), prompt the user for two items and create two objects of the ItemToPurchase class Before prompting for the second item, call

cin.ignore() to allow the user to input a new string. (2 pts)

Item 1

Enter the item name:

Chips

Enter the item price:

Enter the item quantity:

Item 2

Bottled Rater

Enter

Enter the quantity:

(3) Add the costs of the two items together and output the total Cost, (2 pts)

TOTAL cosrr

Chips 1 $3

Bottled Rater 10 e $1

Total: $13

10_201: Labquiz 6: Online Shopping Cart

Current file: main.coo β€’

0/10

Load default template.β€ž

  • Lab-6-hdl2sz.zip