Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Design and implement a class named Student. A student has an id, a last name, a first name, and a phone number. Create appropriate

1. Design and implement a class named Student. A student has an id, a last name, a first name, and a phone number. Create appropriate constructor(s) and accessor and mutator methods for the Student class. Add a static variable to the Student class and set its initial value to 100000000. When a new student is created, this static variable is automatically incremented by 1 and the new value is assigned to the id of the new student. 2. Design and implement a class named Course. A course has a course name (such as INFO2313), a list of students (which is an array of Student objects. Assume that the maximum number of students for a course is 35), and the actual size of the course. Create a constructor for creating a course object with a given course name. Create a method for adding a student to the course and another method for returning the array of all students. Add another method to get the size of the course. 3. In the main method, create a new course and create a few students. Add the students to the course. Get the list of students and display their ids, last names, first names, and phone numbers

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions