|
home—info—labs—hws—exams
textbook—java.lang docs—java.util docs—archive
class Quiz { java.util.Scanner s = new java.util.Scanner(System.in); /* Find the largest grade entered. * We assume the input is only positive integers (and there's at least one). * @return the largest number read by s. */ int maxScore_v1() { // Use a while loop. } static final int NUM_SCORES = 1000; // Abbreviate: "NS" /* Find the largest score of the next 1000 (NUM_SCORES) in the input. * We assume the input is only positive integers (and there's at least 1000). * @return the largest number read by s, in the next {@value NUM_SCORES}. */ int maxScore_v2() { // Use a while loop. } /* Find the largest number of the next 1000 in the input. * We assume the input is only positive integers (and there's at least 1000). * @return the largest number read by s, in the next 1000. */ int maxScore_v3() { // Use a for-loop. } } |
Double, Boolean, Integer (not “Int”), Character (not “Char”), plus seldom-used Long, Short, Byte, Float.
home—info—labs—hws—exams
textbook—java.lang docs—java.util docs—archive
©2008, Ian Barland, Radford University Last modified 2008.Nov.10 (Mon) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |