Tags:
tag this topic
create new tag
view all tags
---+ Selection: Fall 2023 ---++ Learning Objective(s) 1 Learn to use selection 1 Write your first program 1 Learn to work with strings, characters, and integers ---++ Overview of the Program For this program you are to get the user to enter two numbers, an operation, and what they think the answer is. The program should then compute the answer and tell the user if they are correct. ---++ Specifics * The program should be called *Arithmetic.java* * All arithmetic is to be integer arithmetic * The user is to input a +, -, *, or / to indicate what operation * If a wrong operation is given, the program should inform the user that a wrong operation was given. ---++Sample dialogue Below is a sample dialogue. Your output can vary somewhat as long as the required data is nicely displayed <pre> What is the first number? 5 What operation (+, -, *, /)? + What is the second number? 7 What do you think the answer is? 15 You did not get it right.</pre> You can also run a solution for this program if you want. See classroom instructions for more details. ---++Submission a. Create your SDR. * In *Lessons Learned*, include a discussion on how the operation was inputted and handled. * If you used any hints, be sure to indicate that in the *Outside Resources Used* section a. Convert your SDR into a pdf document a. Create an empty zip folder a. Place your java file and pdf document in it. a. Submit the zip folder on canvas ---++Hints 1 [[CSC121F2023Lab02Hint1][Algorithm hint]] 1 [[CSC121F2023Lab02Hint2][Handing the operation]] ---++ 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. Use a switch statement to decide what operation to compute
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2023-06-09
-
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
E
dit
A
ttach
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