Tags:
view all tags
---+Second Program ---++Learning Objective(s) 1. Understand and use if statements 1. Be able to use input/output 1. Be able to write small programs 1. Start to think about special cases ---++Overview of the Program This lab has three separate programs. The can be found in chapter four of <u>Let us Java</u> -> Question c, parts a, d, and g. Be sure to include proper comments in each program. ---++Specifics 1. You may assume all numbers are integers. 1. Include a separate section for each program in the testing report. ---+++Program one If cost price and selling price of an item is input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he/she incurred.<br>You should identify and use at least three different sets of data to properly test your program. ---+++Program two If the ages of Ram, Shyam and Ajay are input through the keyboard, write a program to determine the youngest of the three. There could be at least 13 different types of data sets for testing but you only need to worry about six. ---+++Program three If the three sides of a triangle are entered through the keyboard, write a program to check whether the triangle is isosceles, equilateral, scalene or right angled triangle. ---++Submission 1. Create an empty zip folder. 1. Place each program (.java file) in it 1. Place your software development report in it. 1. Submit the zip folder on canvas ---++Optional improvements Optional improvements should ONLY be worked on once the program is completing working. In addition, the work is to be done on your own with little if any help for lab assistants or the instructor. 1. Check for invalid input and reject it 1. Handle all 13 possible test cases for program two.
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r1 - 2021-12-06
-
cathybareiss
Home
Site map
Assessment web
BethelAIResources2026 web
CenterForComputing web
ChatGPT web
Intro2AIatBethel web
Main web
Sandbox web
TWiki web
CenterForComputing Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Edit
Attach
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback