1. Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods. Demonstrate the class by writing a program that creates three instances of it. One instance should hold your information, and the other two should hold your friends' or family members' information.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question
Please help me with these two program using java. Don’t make them hard. Make it easy as you possibly can
1. Design a class that holds the following personal data: name,
address, age, and phone number. Write appropriate accessor
and mutator methods. Demonstrate the class by writing a
program that creates three instances of it. One instance
should hold your information, and the other two should hold
your friends' or family members' information.
2. Define a class called Journal that could be used to store an entry for
a research paper that will be published. The class should have instance
variables to store the author's name, title of the paper, and the date of
submission. Add a constructor to the class that allows the user of the
class to set all instance variables. Also add a method, displayDetails,
that outputs all the instance variables, and another method called
getSubmission Details that returns the title of the paper, with the first
letter of each word capitalized. Test your class from the main method.
Transcribed Image Text:1. Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods. Demonstrate the class by writing a program that creates three instances of it. One instance should hold your information, and the other two should hold your friends' or family members' information. 2. Define a class called Journal that could be used to store an entry for a research paper that will be published. The class should have instance variables to store the author's name, title of the paper, and the date of submission. Add a constructor to the class that allows the user of the class to set all instance variables. Also add a method, displayDetails, that outputs all the instance variables, and another method called getSubmission Details that returns the title of the paper, with the first letter of each word capitalized. Test your class from the main method.
Expert Solution
steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Knowledge Booster
Software Development
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage