Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Write the class Section which includes: (23 marks) a) 2 attributes: Section number and ArrayList of Students. b) one-arg constructor that accepts (as an

image text in transcribed

2. Write the class Section which includes: (23 marks) a) 2 attributes: Section number and ArrayList of Students. b) one-arg constructor that accepts (as an argument) the Section number, and create a new empty ArrayList of Students. c) method addStudent() that accepts a Student and add it to the ArrayList with a confirmation message. It is not allowed to add the same Student twice and in this case an error message should be displayed. d) method averageGPAO) which returns the average GPA of regular Students (whose GPA >= 2). It returns O if there are no regular students in the section e) method savelntoFile() which accepts a file name. It stores the section number and information of all Students in this file (each Student in a different line)

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_2

Step: 3

blur-text-image_3

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 In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago