I need help on this assignment I'll send the instructions. But I don't think I did it right can you help me out?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need help on this assignment I'll send the instructions. But I don't think I did it right can you help me out? 

Chapter 2 Project
Project Name: Chpt2_Project
Class Name: Chpt2_Project
Write a Java program that calculates how many hours it will take to make a trip by car.
Step 1. Create an algorithm for the program (either a flowchart or pseudocode). You will have to
submit the algorithm so make sure it is legible if drawn by hand.
Step 2. Create a program in Eclipse that does the following.
Inputs: The program must prompt the user for the average speed (mph) of the car and the trip distance.
Enter the average miles per hour (mph) for the car (this must be an integer):
Enter the distance in miles the trip is (this must be a double):
Output: The program should have this output (below is an example):
The trip will take the following number of hours:
Test data: Use the following data to test your program:
The car averages 65 MPH and the trip is 400 miles.
Take a screen shot of your program running in Eclipse and paste it into a Word document. It should look
like the image below.
<terminated> C2 Project [Java Application] E:\Program Files\Java\jdk-14.0.2\bin\javaw.exe (Oct 21, 2020 9:28:27 AM-9:28:43 AM)
Enter the average miles per houmph) for the car (this must be an integer): 65
Enter the distance in miles the trip is (this must be a double): 400
The trip will take the foll ing number of hours: 6.153846153846154
MacBook Pro
7.
6.
Transcribed Image Text:Chapter 2 Project Project Name: Chpt2_Project Class Name: Chpt2_Project Write a Java program that calculates how many hours it will take to make a trip by car. Step 1. Create an algorithm for the program (either a flowchart or pseudocode). You will have to submit the algorithm so make sure it is legible if drawn by hand. Step 2. Create a program in Eclipse that does the following. Inputs: The program must prompt the user for the average speed (mph) of the car and the trip distance. Enter the average miles per hour (mph) for the car (this must be an integer): Enter the distance in miles the trip is (this must be a double): Output: The program should have this output (below is an example): The trip will take the following number of hours: Test data: Use the following data to test your program: The car averages 65 MPH and the trip is 400 miles. Take a screen shot of your program running in Eclipse and paste it into a Word document. It should look like the image below. <terminated> C2 Project [Java Application] E:\Program Files\Java\jdk-14.0.2\bin\javaw.exe (Oct 21, 2020 9:28:27 AM-9:28:43 AM) Enter the average miles per houmph) for the car (this must be an integer): 65 Enter the distance in miles the trip is (this must be a double): 400 The trip will take the foll ing number of hours: 6.153846153846154 MacBook Pro 7. 6.
www
F.
# 3
Elite Gourmeto
→奇少,必,ふ山
E Outline X
D module-info.java
1 package chpt2_project;
Chpt2 Project.java X
E Package Explorer X
Chpt2 Project
AJRE System Library [Java SE 11.0.13 [11.0.13]]
8名
3 import java.util.*;
5 public class Chpt2_Project {
chpt2 project
Chpt2 Project
5main(String[]): void
src
4
v chpt2 project
> Chpt2 Project.java
> Dmodule-info.java
6.
public static void main(String[] args) {
8.
System.out.println(" Enter the average miles per hour (mph) for the car: 65 ");
int speed = 65;
System.out.println("Enter the distance in miles the trip is: 400 ");
double distance 400;
6.
11
12
13
14
15
double flowRate = (distance/speed);
System.out.println("The trip will take the following number of hours: ");
17
18
20
21
22
{
24
Problems
@ Javadoc Declaration
Console X
<terminated> Chpt2_Project [Java Application] /Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home/bin/java (Jan 31, 2022, 4:11:20 PM- 4:11:22 PM)
Enter the average miles per hour (mph) for the car: 65
Enter the distance in miles the trip is: 400
The trip will take the following number of hours:
Writable
Smart Insert
11:17: 229
MacBook Pro
$
&
*
4
delete
2.
%3D
9.
8.
R
G
D.
option
command
command
Transcribed Image Text:www F. # 3 Elite Gourmeto →奇少,必,ふ山 E Outline X D module-info.java 1 package chpt2_project; Chpt2 Project.java X E Package Explorer X Chpt2 Project AJRE System Library [Java SE 11.0.13 [11.0.13]] 8名 3 import java.util.*; 5 public class Chpt2_Project { chpt2 project Chpt2 Project 5main(String[]): void src 4 v chpt2 project > Chpt2 Project.java > Dmodule-info.java 6. public static void main(String[] args) { 8. System.out.println(" Enter the average miles per hour (mph) for the car: 65 "); int speed = 65; System.out.println("Enter the distance in miles the trip is: 400 "); double distance 400; 6. 11 12 13 14 15 double flowRate = (distance/speed); System.out.println("The trip will take the following number of hours: "); 17 18 20 21 22 { 24 Problems @ Javadoc Declaration Console X <terminated> Chpt2_Project [Java Application] /Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home/bin/java (Jan 31, 2022, 4:11:20 PM- 4:11:22 PM) Enter the average miles per hour (mph) for the car: 65 Enter the distance in miles the trip is: 400 The trip will take the following number of hours: Writable Smart Insert 11:17: 229 MacBook Pro $ & * 4 delete 2. %3D 9. 8. R G D. option command command
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Troubleshooting
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education