Question: USING JAVA - This is the Console class which needs to be used for the questions: public class Console { public static Scanner console =

 USING JAVA - This is the Console class which needs to

USING JAVA - This is the Console class which needs to be used for the questions:

public class Console { public static Scanner console = new Scanner(System.in); public static String askString(String aPrompt) // method for string input { System.out.print(aPrompt); // aPrompt is a request for string input String reply = console.nextLine(); // input held in a variable called reply return reply; } public static int askInt(String aPrompt) // method for integer input { String reply = askString(aPrompt); return Integer.parseInt(reply); // parseInt converts string to integer } public static double askDouble(String aPrompt) // method for double input { String reply = askString(aPrompt); return Double.parseDouble(reply); // parseDouble converts string to double } public static char askChar(String aChar) // method for one character input { String reply = askString(aChar); // Take first character of string and convert to Uppercase return Character.toUpperCase(reply.trim().charAt(0)); } }

please solve the questions with the console java code above and solve as understandable as possible so I can understand how to do this for other questions. Steps would be great too! Thanks!

4.Create a class called Balance. Prompt the user to input a starting balance and an interest rate. Work out the balances after the first, second and third year Create a class called Coins class to read an amount in pence. Work out the number of pound coins, 50 pence coins, 20 pence coins, 10 pence coins, 5 pence coins and 1 penny coins for amount entered. 5. Create a class called BMI Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your 6.weight in kilograms and dividing by the square of your height in meters Write a program to allow the user to enter their weight in pounds and height in inches. Note that if one pound is 0.4535 kilograms and one inch is 0.0254 meters, display the BMI for the user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!