End-of-chapter Programming Challenges from Gaddis textbook:
Chapter 2: 1, 9
These problems should be completed before you start working on your graded homework assignment. These can be done in collaboration with classmates, though each of you should create your own solution from scratch in a separate file. These practice problems will not be graded. |
The WageCalculation program from Handout 1 WageCalculation.java This is the first Java program presented in class. Note that it does not use any user input. |
Scanner methods SimpleScannerDemo.java ScannerDemo.java The first program demonstrates four different Scanner methods. The second program shows that an extra nextLine() must be used when reading a String after reading a value with nextInt(), nextDouble() or next(). |
Arithmetic IntegerVsDoubleDivision.java ModOperator.java TypeCastingDemo.java These programs demonstrate division, remainder (a k a MOD) operators and type casting. |
Type CHAR CharType.java Examples demonstrating char type and char/int duality. |
PhoneCall program from Handout 2 PhoneCall.java Completed program, with user input. |