Java Question - Instructions are in the attached pictures. The picture titled "Screenshot..." are the instructions for building the specific code, while the "Final Output" picture shows what the output of the code should look like. Please make sure no errors show up in the Java compiler. Thank you.

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

Java Question - Instructions are in the attached pictures. The picture titled "Screenshot..." are the instructions for building the specific code, while the "Final Output" picture shows what the output of the code should look like. Please make sure no errors show up in the Java compiler. Thank you. 

2. Next to the above two lines, write a Java program to create two individual classes: Address and Location.
Below is the specification of "Address" and “Location" classes.
Class Name
Members
Address
4 private String variables:
numberAndStreet, city, state, zipcode
Location
1 parameterize constructor
default constructor
Requirements
In the default constructor, ask users to
enter number and stree, then ask users
to enter city. Continue to ask for entry
of state and zipcode.
Make sure the parametized constructor
have two parameters “It" and "Ig" of
double type.
391
Java Programming – Penniel P. Wu, PhD
Use the system.out.println() method
to display the entered address.
Use the system.out.printIn() method to
display the entered location with a string
literal
"https://www.google.com/maps/e",
so the output will looks something
similar to:
https://www.google.com/maps/833.8121.-
117.921
3. Create another class named "GPS" as a composition class (aka "composite" class) that uses a parameterized
constructor containing two parameters (named “It" and "Ig"). Use these two parameters to take two values
(latitude and longitude) from the user. Below is the figure that explain their relations.
GPS
Address
Location
4. Inside the parameterized constructor, create one instance of the “Address" class and one instance of the
"Location" class. Be sure to pass the value store in both “It" and “Ig" parameters from the "GPS" constructor to
the parameterized constructor of the “Location" class.
5. In the "main" method of the main class, create two variables of double type named “lat" and “lon". Then, ask
the user to enter the values of latitude and longitude and store the entries in these two variables.
6. Create an instance of GPS, and pass the value stored in “lat" and "lon" to both “It" and “lg" parameters of the
GPS constructor. Make sure the output looks similar to the following.
Transcribed Image Text:2. Next to the above two lines, write a Java program to create two individual classes: Address and Location. Below is the specification of "Address" and “Location" classes. Class Name Members Address 4 private String variables: numberAndStreet, city, state, zipcode Location 1 parameterize constructor default constructor Requirements In the default constructor, ask users to enter number and stree, then ask users to enter city. Continue to ask for entry of state and zipcode. Make sure the parametized constructor have two parameters “It" and "Ig" of double type. 391 Java Programming – Penniel P. Wu, PhD Use the system.out.println() method to display the entered address. Use the system.out.printIn() method to display the entered location with a string literal "https://www.google.com/maps/e", so the output will looks something similar to: https://www.google.com/maps/833.8121.- 117.921 3. Create another class named "GPS" as a composition class (aka "composite" class) that uses a parameterized constructor containing two parameters (named “It" and "Ig"). Use these two parameters to take two values (latitude and longitude) from the user. Below is the figure that explain their relations. GPS Address Location 4. Inside the parameterized constructor, create one instance of the “Address" class and one instance of the "Location" class. Be sure to pass the value store in both “It" and “Ig" parameters from the "GPS" constructor to the parameterized constructor of the “Location" class. 5. In the "main" method of the main class, create two variables of double type named “lat" and “lon". Then, ask the user to enter the values of latitude and longitude and store the entries in these two variables. 6. Create an instance of GPS, and pass the value stored in “lat" and "lon" to both “It" and “lg" parameters of the GPS constructor. Make sure the output looks similar to the following.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Threads
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