Lab05b - demo.setNum(num); System.out.println(demo);

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

View Full Document Right Arrow Icon
//© A+ Computer Science - www.apluscompsci.com //Name - //Date - //Lab - import static java.lang.System.*; import java.util.Scanner; public class Lab05b { public static void main ( String[] args ) { Scanner keyboard = new Scanner(System.in); out.print("Enter a integer number :: "); int num = keyboard.nextInt(); OddOrEven demo = new OddOrEven(num); System.out.println(demo); out.print("Enter a integer number :: "); num = keyboard.nextInt(); demo.setNum(num); System.out.println(demo); out.print("Enter a integer number :: "); num = keyboard.nextInt();
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: demo.setNum(num); System.out.println(demo); out.print("Enter a integer number :: "); num = keyboard.nextInt(); demo.setNum(num); System.out.println(demo); out.print("Enter a integer number :: "); num = keyboard.nextInt(); demo.setNum(num); System.out.println(demo); out.print("Enter a integer number :: "); num = keyboard.nextInt(); demo.setNum(num); System.out.println(demo); out.print("Enter a integer number :: "); num = keyboard.nextInt(); demo.setNum(num); System.out.println(demo); } }...
View Full Document

This note was uploaded on 11/11/2011 for the course C++ comp122 taught by Professor N/a during the Spring '07 term at Cy-Fair College.

Page1 / 2

Lab05b - demo.setNum(num); System.out.println(demo);

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

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