Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 [3 marks]: Explain the difference in function between the java and javac commands in the Java programming language. Question 2 [3 marks]: Design
Question 1 [3 marks]: Explain the difference in function between the java and javac commands in the Java programming language. Question 2 [3 marks]: Design a flowchart for a Java application which will allow a user to input an integer value representing a speed limit as well as another integer value representing the speed of some vehicle. The application will then calculate if the driver of the vehicle should pay a fine according to the following criteria: (a) If the specified speed limit is not exceeded, the application will output to the screen "No Fine". (b) If the speed limit is exceeded by no more than 20 km/h, then the application will output "Fine = 200 AED". (c) If the speed limit is exceeded by more than 20 km/h, but by no more than 40 km/h, then the application will output "Fine = 400 AED". (d) Exceeding the speed limit by more than 40 km/h will cause the program to output "Fine = 1,000 AED". Question 3 [4 marks]: Implement the Java application with the functionality to meet the requirements of Question 2. The text in the gray boxes below represent typical input and output for the proposed application:- Enter the value for the speed limit: 100 Enter the value for the speed of the vehicle: 100 No Fine Enter the value for the speed limit:80 Enter the value for the speed of the vehicle: 100 Fine = 200 AED Enter the value for the speed limit: Iba Enter the value for the speed of the vehicle: 120 Fine = 200 AED Enter the value for the speed limit:89 Enter the value for the speed of the vehicle: 120 Fine = 400 AED Enter the value for the speed limit: 200 Enter the value for the speed of the vehicle: 121 Fine 400 AED Enter the value for the speed limit:80 Enter the value for the speed of the vehicle: 121 Fine = 1000 AED
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