Question: Answer in Java, please explain too. 11.18 Composition Assignment Write a Java program that prompts user for a file name, opens and reads the data,

Answer in Java, please explain too.

Answer in Java, please explain too. 11.18 Composition Assignment Write a Javaprogram that prompts user for a file name, opens and reads thedata, process, and store them in an array or ArrayList of students.

11.18 Composition Assignment Write a Java program that prompts user for a file name, opens and reads the data, process, and store them in an array or ArrayList of students. A Student (you need to declare it) is a class defining a Student with information (such as name, id and a list of courses) and associated operations Course is a class containing information (such as name, grade and number of units) and associated operations. The program calculates the total completed units and GPA for a student. The program then prints a table to the monitor and stops execution. (Refer to the sample below.) Use the following table to assign points for a course: Grade Points A 4.0 B 3.0 2.0 D 1.0 F 0.0 To calculate the GPA multiply units by points for each course, and then add then together and divide the sum by total units. For example if course 1 has 5 units and the grade is A (4 points) and course 2 has 4 units and the grade is B (3 points), and course 3 has 4 units and the grade is Fthen (4*3+5* 4 + 4*0)/13 = 2.462. Completed course are all the courses that have a passing grade (a, b, c, and d), Units taken is sum of all units registered for. Completed courses are considered the ones with passing grade (A,B,C,D). Input File Format Input File Sample: Last, First Smith Jr., Joe ID numberofcourses 111-22-33333 Course 1 name Physics Grade Units A 5 Course 2 name English 1A B4 Grade Units Course 3 name English 1B Grade Units F4 Jones, Bill 111-11-11114 Physics Physics A 5 Chemistry 1A B5 Computer Science 1 A4 Chemistry 1 Lab B 1 Requirements: Develop a class to represent a Student (the following data members must be included, more is OK): Name (First, Last) old number . list of courses number of units taken o units completed o units taken average Develop a class to represent a Course(the following data members must be included, more is OK): o Course Name Course Units o Course Grade Program must be modular (all tasks must be done in methods) Must include methods to process array of students UML representation of classes Prompt user for all input and output file names Use attached data file to test your program. Error check files If you use an array, set array size to 20 for students and courses, but when adding elements check the size to make sure not to overflow the array. Final report to the monitor and output file Sample output: Name Joe Smith Jr. Bill Jones Nancy Brown Id 111-22-3333 111-11-1111 222-11-1111 Units Taken 13 15 42 Units Completed 9 15 38 Average 2.46 3.60 3.38 Total number of Students: 3 Total Units completed by all students: 62 Total Units taken by all students: 70 Required files to submit Student.java Course.java Mange Student.java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!