Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java please Create a new package named program3 in Eclipse (the project name can be 112 or whatever you have), and put all the

In java please

image text in transcribed

image text in transcribed

Create a new package named program3 in Eclipse (the project name can be 112 or whatever you have), and put all the classes in this package (right-click on a project New Package, type program3 as the package name). Now, add a class to the package (right-click on the package New Class, type StudentEntry as the class name). Write a class named StudentEntry that has instance fields for a person's name, phone number, and email (all are Strings). The class should have a constructor that takes three parameters (the student's name, phone number, and email) and appropriate accessor methods (getters) and mutator methods (setters) StudentEntry name : String -phone : String - email: String + StudentEntry (n : String, p : String, e : String) : + setName (n : String) : void + setPhone (p : String) : void + setEmail (e : String) : void + getName(): String + getPhone (): String + getEmail(): String Then write a class StudentEntryDemo (this is the driver program used to test the other class), in the main method, create three StudentEntry objects with the names, phone numbers, and emails Now create an ArrayList of StudentEntry objects, add the objects to the ArrayList one by one. Use a for loop to display the info for each student in the ArrayList (remember the example we did in class for the BankAccount objects, you need to use the get method of the ArrayList to get each individual object, and then use the accessor methods in StudentEntry to get the name, phone number, and email for each student). Check the sample output on next page. You can name your programs StudentEntry.java and StudentEntryDemo.java

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions