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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:00, sophiawatson70
Create a cell reference in a formula by typing in the cell name or         a. right-clicking the cell. b. clicking the cell. c. clicking the column where the cell is located. d. clicking the row where the cell is located.
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, Braxtonw875
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, Morganwing1019
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
image
Computers and Technology, 23.06.2019 09:30, kreshnikolloma
You wanted to look up information about alzheimer's, but you were unsure if it was spelled "alsheimer's" or "alzheimer's." which advanced search strategy would be useful? a) a boolean search b) using a wild card in your search c) trying different search engines d) doing a search for "alsheimer's not alzheimer's" asap. ill give brainlist.
Answers: 1
You know the right answer?
Note: creating multiple scanner objects for the same input stream yields unexpected behavior. thus,...

Questions in other subjects: