Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help. Thank you. Problem Write_a program that creates Student Objects using data from the attached students.txt file( below ). Add code to limit the

Please help. Thank you.

Problem

Write_a program that creates Student Objects using data from the attached "students.txt" file(below). Add code to limit the number of students created to 24. At a minimum, each Student object should contain the following attributes: (26 pts)

First name (string and const) - (5 pts)

Last name (string and const) - (5 pts)

Social Security Number (string) - (4 pts)

Four Exam Grades (array of type double) - (4 pts)

Student Average Exam Grade (double) - (4 pts)

Student Number (int and static) - Initially set to zero. Each time a Student object is created, the Student Number is incremented by one and when destroyed, decremented by one.(4 pts)

Add member functions to the Student class to: (9 pts)

Function to return the average Exam Grade of a student:(Sum of Four Exam grades divided by four).

Getter and Setter Functions for each attribute

Function to display associated attributes of the Student

Create_ a single ClassRoom object with the following attributes (9 pts)

Name of the ClassRoom object (string ) - Choose any name (i.e. CSC134)

Count of the number of students in the ClassRoom (int)

Dynamic Array of Student Objects (maximum size is 24) - Represented as an array of pointers.

Add member functions to the ClassRoom class to: (32 pts)

ClassRoom Constructor Function - (4 pts)

ClassRoom Destructor Function - (4 pts)

Read the input data file and create the Student objects. - (4 pts)

Sort list of students by student average - (4 pts)

Sort list of students by student last name - (4 pts)

Return the average grade of all students (Sum of Student Average divided by number of students). - (4 pts)

Display a summary of all the students in the ClassRoom object and the associated attributes of each student attributes. - (4 pts)

Return the count of student objects created - (4 pts)

Write the main() driver to demonstrate the following: (24 pts)

1.Create_ a ClassRoom Object (3 pts)

2.Use the ClassRoom Object to read the Student Objects from the input file "students.txt" (3 pts)

3.Usethe ClassRoom Object to sort list of students by student average (3 pts)

4.Display the list of students by student average (3 pts)

5.Use the ClassRoom Object to sort list of students by student last name (3 pts)

6.Display the list of students by student last name (3 pts)

7.Use the ClassRoom Object to display the average grade of all students.(3 pts)

8.Use the ClassRoom Object to display the number of Student objects created (3 pts)

NOTE: No global non-constant variables should be used. You can add more data members or member functions for Student and ClassRoom Class Definitions if needed.

students.txt:

AlfalfaAloysius123-45-678990.0100.083.049.0

AlfredFrancis123-12-123497.096.097.048.0

GertyGramma567-89-012380.060.040.044.0

AndroidAlexis087-65-432123.036.045.047.0

BumpkinFred456-78-901278.088.077.045.0

RubbleBetty234-56-789090.080.090.046.0

NoshowCecil345-67-890181.065.049.043.0

BuffBif632-79-993920.030.040.050.0

AirpumpAndrew223-45-678975.090.0100.083.0

BackusJim143-12-123485.097.096.097.0

Carnivore Art565-89-012371.080.060.040.0

DandyJim087-75-432192.023.036.045.0

ElephantIma456-71-901219.078.088.077.0

FranklinBenny234-56-289050.090.080.090.0

GeorgeBoy345-67-390140.011.091.084.0

Heffalump Harvey632-79-943930.091.020.030.0

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

Communication; Reflective thinking)

Answered: 1 week ago