InLab02 - In-Lab Assignment#2 Selection(Ch...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: In-Lab Assignment #2: Selection (Ch 3)Instructions:Select any problems for a maximum of 10 points (no extra credit). Collaboration is permitted. Students present during lab have until midnight tomorrow to submit their files. You will still use DrJava to enter and test your programs as before. However, you will use the textbook’s Automatic Grading System (AGS) website to submit your final solutions.Standard SetPS02_1(5 pts)Ask the user for an integer number. If the value is between –10 and +10 but does not include –10 or +10, then display the message “Between -10 and 10”. Otherwise, display the message “Not between -10 and 10”. Use DrJava to get your program working, but be sure to call your program file “PS02_1.java” in order to use the AGS later. Try these test cases:a.0 is between.b.+10 is not between.c.–10 is not between.PS02_2(5 pts)Ask the user for two nonzero integer numbers. Use a single “if” statement to determine whether both numbers have the same sign (positive or negative) without using any boolean operators (do not use && or ||). If they both have the same sign (positive or negative) without using any boolean operators (do not use && or ||)....
View Full Document

This note was uploaded on 04/10/2008 for the course ENGR 131 taught by Professor Xiaowei during the Spring '07 term at Case Western.

Page1 / 2

InLab02 - In-Lab Assignment#2 Selection(Ch...

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