This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full 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 textbooks 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
- Spring '07