Question
Netbeans project named Lab5. Give the main class an appropriate name with the following assignment description in mind. A program that will ask the user
Netbeans project named Lab5. Give the main class an appropriate name with the following assignment description in mind.
A program that will ask the user to enter their name and to enter the number of steps they walked in a day. Then ask them if they want to continue. If the answer is "yes" ask them to enter another number of steps walked. Ask them again if they want to continue. If they put anything besides "yes" you should end the program by telling them "goodbye, [NAME]" and the sum of the number of steps that they have entered.
Example run below. Text from the program is in green. Responses from the user are in red. I am using different colors to show you what your program will print versus what a test user might type. Your output and input in NetBeans will NOT be in different colors.
Please enter your name:Dave
Please enter the number of steps you have walked:1000
Would you like to continue? (Type 'yes' if yes):yes
Please enter another number of steps:2000
Would you like to continue? (Type 'yes' if yes):yes
Please enter another number of steps:3000
Would you like to continue? (Type 'yes' if yes):no
Goodbye, Dave. The total of the number of steps you entered is 6000.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started