subject

Note: creating multiple scanner objects for the same input stream yields unexpected behavior. thus, good practice is to use a single scanner object for reading input from system. in. that scanner object can be passed as an argument to any methods that read input.

this program extends the earlier "online shopping cart" program. (consider first saving your earlier program).

(1) extend the itemtopurchase class per the following specifications:

private fields

string itemdescription - initialized in default constructor to "none"

parameterized constructor to assign item name, item description, item price, and item quantity (default values of 0). (1 pt)

public member methods

setdescription() mutator & getdescription() accessor (2 pts)

printitemcost() - outputs the item name followed by the quantity, price, and subtotal

printitemdescription() - outputs the item name and description

ex. of printitemcost() output:

bottled water 10 @ $1 = $10

ex. of printitemdescription() output:

bottled water: deer park, 12 oz.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
What is the largest decimal number that can be represented by a binary number with 4 place values? (remember, each place in a binary number has a value of a power of 2, starting in the ones place with 20.)
Answers: 3
question
Computers and Technology, 22.06.2019 12:00
Which of the following does 3d animation create an illusion of on the screen? a. depth b. emotion c. length d. dialogue
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
You know the right answer?
Note: creating multiple scanner objects for the same input stream yields unexpected behavior. thus,...
Questions
question
History, 15.01.2020 06:31
question
Mathematics, 15.01.2020 07:31
Questions on the website: 13722361