Pre-AP Comp Science Chapter 7 Hands On Review

advertisement
Pre-AP Comp Science Chapter 7 Hands On Review
Create a LunchCounter application that prompts the user for the number of lunchItem1, lunchItem2, and
lunchItem3 they would like to order and then displays the total cost of the lunches. The cost for lunchItem1 is
$5.40, the cost for lunchItem2 is $6.50, and the cost for lunchItem3 is $7.50. The LunchCounter application
should include a totalCost() method that has three int parameters corresponding to the number ordered of each
lunch item and return a double that corresponds to the dollar value of the bill.
Pre-AP Comp Science Chapter 7 Hands On Reciew
Answer Section
CASE
1. ANS:
A sample answer file corresponding to LunchCounter is stored on the Resource CD in the
ASSESSMENT\HANDS-ON ANSWERS\Ch07 Answer LunchCounter folder.
PTS: 1
TOP: Writing Methods | Method Parameters | The return Statement
NOT: Similar to the ParkConcession Case question in this Question Bank.
2. ANS:
A sample answer file corresponding to ParkConcession is stored on the Resource CD in the
ASSESSMENT\HANDS-ON ANSWERS\Ch07 Answer ParkConcession folder.
PTS: 1
TOP: Writing Methods | Method Parameters | The return Statement
NOT: Similar to the LunchCounter Case question in this Question Bank.
3. ANS:
A sample answer file corresponding to MathQuiz is stored on the Resource CD in the ASSESSMENT\HANDSON ANSWERS\Ch07 Answer MathQuiz folder.
PTS: 1
TOP: Writing Methods | Method Parameters | The return Statement | Documenting Methods
4. ANS:
A sample answer file corresponding to Translator is stored on the Resource CD in the ASSESSMENT\HANDSON ANSWERS\Ch07 Answer Translator folder.
PTS: 1
TOP: Writing Methods | Method Parameters | The return Statement | Documenting Methods
Download