'm having trouble with my assignment, I know how to start the eclipse project but for some reason it keeps saying error and I have to declare a named package. I uploaded the assignment and the error I'm having.

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'm having trouble with my assignment, I know how to start the eclipse project but for some reason it keeps saying error and I have to declare a named package. I uploaded the assignment and the error I'm having. 

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.
* 00
IN
エ
ww.
# 3
回T,,f4合, →
D *Chpt2 Project.java X
D module-info.java
1 |
2 public class Chpt2 Project {
Package Explorer X
8多日
v Chpt2 Project
JRE System Library [JavaSE-11]
3.
public static void main(String[] args) {
src
(default package)
>Chpt2 Project.java
Dmodule-info.java
5.
9
7.
Scanner input = new scanner(System.in);
System
12
A Problems x
@ Javadoc e Declaration
1 error, 0 warnings, 0 others
Description
^ Resource
Path
Location
O Errors (1 item)
O Must declare a named package because this c Chpt2_Project.ja/Chpt2_Project/src
line 1
Java Problem
Writable
Smart Insert
1:1:0
MacBook Pro
esc
$
4.
9.
7.
R
ヨ
A
Z
B.
Transcribed Image Text:* 00 IN エ ww. # 3 回T,,f4合, → D *Chpt2 Project.java X D module-info.java 1 | 2 public class Chpt2 Project { Package Explorer X 8多日 v Chpt2 Project JRE System Library [JavaSE-11] 3. public static void main(String[] args) { src (default package) >Chpt2 Project.java Dmodule-info.java 5. 9 7. Scanner input = new scanner(System.in); System 12 A Problems x @ Javadoc e Declaration 1 error, 0 warnings, 0 others Description ^ Resource Path Location O Errors (1 item) O Must declare a named package because this c Chpt2_Project.ja/Chpt2_Project/src line 1 Java Problem Writable Smart Insert 1:1:0 MacBook Pro esc $ 4. 9. 7. R ヨ A Z B.
Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Fundamentals of Testing Strategies
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
  • SEE MORE 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