Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions