Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions for Part 1 For part 1 you need to create four classes: Main, Person, Personlist, and PersonSet. 1 1. Write a class named Person.

image text in transcribed

Instructions for Part 1 For part 1 you need to create four classes: Main, Person, Personlist, and PersonSet. 1 1. Write a class named Person. This will be a very basic class with three attributes for storing name, height, and weight information. This class should also have a toString method that returns the Person data in a database-ready String format. 2. Write an interface named Personlist. The interface should have two abstract methods: A. add - This method takes a Person as input and returns void. B. get - This method takes an int as input and returns a Person at the corresponding index of the input int. 3. Write a class named, PersonSet, that implements the interface PersonList. For part 1, I don't want you to fill in the code of any of the Personset methods, just make a shell with placeholders. For instance, you can return null from the get method in order to make it compile. 4. In the main method in Main: A. Instantiate a single person object as a test. You can make up the data passed to the constructor. B. Instantiate a PersonSet object as a test. C. Read data in from the file hr.txt and display it on the command prompt. UML Diagram for Human Resources Part 1 > Personlist add[p: Person):void + getindex: int) : Person

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

What are the innovations taking place in franchising today?

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago