Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7A - ArrayList of Objects Submit the archive of the project to BB (see instruction of exporting archive next pagel in this lab, we wil

image text in transcribed
image text in transcribed
7A - ArrayList of Objects Submit the archive of the project to BB (see instruction of exporting archive next pagel in this lab, we wil create a project to work with multiple classes, Arraylist, inheritance, and interface. 1. Class Person Create a new abstract superclass called Person that includes a String variable for the name and an appropriate variable for the age Write Constructors, setters, getters as needed 2. Class Student Extend the Person class and also have the following one final statie variable o hoursNeeded, int, set to 120, for the credit hours needed for getting a degree . two private Instance felds: o major, String o hoursCompleted, int, for the credit hours already completed Override Java's default Object .toSering) in the Student class to return string like: Alex has completed 39 hours. He has another 81 credt hours to go. (The content in BOLD and tolic should be from variable or method call Write Constructors, setters, getters as needed 3. Interface StudentGroup inport java.util.ArrayList public interface StudentGroup ( Arraylist group- new Arraylistoo; You may add sore nembers in the interface if needed. 4. Class OuterMain It impliements the StudentGroup interface Create 5 students and add them to the Arraylist group, iterate through the Arrayuist and print the students and their hours completed and hours to go lby calling the toString method) At the end, also print out the average hours completed Instruction for exporting archive In the Package Explorer, right click your project Export In the dialog, expand General, select Archive File, then click Nexts In the dialog, Browse to select a location and enter a name for the zip file. Leave other options default and click Finish. Once done, upload the archive zip file to BB. Select New Go Into Open in New Window Open Type Hiran DIDSON taponesence. to anarchie Kle on the locals' ten Factorial Select an eport wiand HWZ-GuShow in Lecal Terminal Archive File Preferences X Delete Intal Source

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions