ITEC 1620 Lecture Notes - Lecture 4: Negative Number, Slot Machine, Infinite Loop

294 views6 pages

Document Summary

213481841: what output is produced by the following code fragment? int limit = 100, num1 = 15, num2 = 40; if (limit <= limit){ if (num1 == num2) The output produced by this code fragment is lime and grape: what is wrong with the following code fragment? count = 50; while (count >= 0){ Print an appropriate statement if all three of the numbers are the same, or if any two of the numbers are the same. Continue playing until the user chooses to stop. 213481841: modify the die class from chapter 4 so that the setfacevalue method does nothing if the parameter is outside of the valid range of values. 213481841: modify the account class from chapter 4 so that it performs validity checks on the deposit and withdraw operations. Specifically, don"t allow the deposit of a negative number or a withdrawal that exceeds the current balance. Print appropriate error messages if these problems occur.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents