CSC 212 Program 010

CSC 212 Program 010 - CSC 212 Program # 01 50 points Create...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC 212 Program # 01 50 points Create a class ConsoleIn to allow type-safe data input from keyboard using Scanner class. Develop methods labeled as read followed by datatype (readByte, readShort, ….) to read a data item of the specific datatype by first testing if the next input token matches the datatype. Pass a string argument to each method to prompt the user with proper message (“Please Enter an Iteger”,…). The layout of the class ConsolIn is provided in next page. Create a program to prompt the user for input of a specific type (use a menu with one option for each basic data type), read the input and report the data item just read and the minimum and maximum value of the data type just read. The basic layout of the client program is provided in next page. Use MIN_VALUE, MAX_VALUE static fields for each data type (Byte.MIN_VALUE, Byte.MAX_VALUE).
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ConsolIn class basic layout: public class ConsoleIn { private Scanner scan; public ConsoleIn( ) { scan = new Scanner( System.in );
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

CSC 212 Program 010 - CSC 212 Program # 01 50 points Create...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online