Question: BasicDecisions.java file, which includes a program that meets the following requirements: Create a Balance floating - point variable and assign it a value. Provides the
BasicDecisions.java file, which includes a program that meets the following requirements:
Create a Balance floatingpoint variable and assign it a value.
Provides the following character data type menu to the user:
Check Balance
Deposit
Withdrawal
Exit
When the user enters A or a
Print the balance
When the user enters B or b
Prompt for the amount of deposit
Add the deposit to the balance
Print the new balance
When the user enters C or c
Prompt for the amount of withdrawal
if the amount exceeds the value of the balance provide an error message and do not allow the withdraw
If the amount is balance or lower, subtract the amount from the balance
print the new balance
When the user enters anything other than upper or lower case AD
print an "Invalid Entry!" message.
the user enters D or d or before exiting the program,
print a thank you message and invite to return soon.
Compile, run, and test both files. Ensure that these run and display accurate results.
Finalize your Files.
Ensure that the code is easily legible provide adequate white space
Verify that your variables are meaningful. a is less meaningful than balance as a may not mean much to most of us
Clean your files, remove unused variables and lines of code, unnecessary comments, etc.
Add the requiredcomplete file header. is there a way to do this without using the switch statement and or case but using only if statements and toUpper or toLower? is there a way to do this using only if statements and toUpper and toLower and string
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
