Problem 5 (name this Lab1_Problem5)
This is a "DIY" problem. write a short Java class that
performs a simple calculation based on something you're interested
in—sports, health, science, etc. For this problem, take off the
training wheels—don't use any of the starter code with one
exception: the identification comments at the top of your program.
Hand-code the rest.
Only add code comments for statements that really need clarity
or explanation. Let your variable names self-document your code
instead. Follow all document class standards; even though it's a
DIY problem, it's not freestyle.
⦁ Declare at least two input variables, named
properly and using the most appropriate data type.
⦁ Prompt the user for the value of at least one
of the variables and store it to an appropriate input-capture
variable.
⦁ Perform at least one calculation, storing the
outcome to an expression-result variable.
⦁ Output the result, with an appropriate
caption
starter code:
/*
Your name:
Date started:
Modification history: NA
Remaining tasks: NA
Notes: NA
*/
import java.util.Scanner;
public class Lab1_Problem5
Problem 5 (name this Lab1_Problem5) This is a "DIY" problem. write a short Java class that performs a simple calculatio
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am