Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

students.txt K_Ahmed Section100 92 87 77 H_Atkins Section200 0 45 78 O_Ballard Section300 98 85 72 R_Bell Section100 95 87 90 P_Bossen Section100 93 79

image text in transcribedimage text in transcribedimage text in transcribed

students.txt

K_Ahmed Section100 92 87 77 H_Atkins Section200 0 45 78 O_Ballard Section300 98 85 72 R_Bell Section100 95 87 90 P_Bossen Section100 93 79 63 M_Buntin Section200 99 75 92 H_Czerny Section200 85 86 67 M_Furlo Section100 96 77 84 K_Hermiz Section300 87 76 73 I_Jarbo Section100 81 84 77 C_Kennedy Section300 85 87 82 F_Ljuljdjurovic Section100 95 95 88 B_Maruska Section200 80 80 74 U_Moir Section300 96 91 64 G_Opiola Section100 87 78 76 D_Romanski Section200 94 87 75 B_Scott Section300 82 85 60 P_Tucker Section100 96 85 78 J_Weber Section200 85 86 89 S_Yang Section100 81 84 80 K_Alghamdi Section200 88 89 85 C_Banks Section300 95 83 82 T_Barnard Section100 99 75 88 M_Chadha Section200 91 75 69 G_Depalma Section300 90 85 82 C_Harden Section100 0 75 60 U_Hummel Section200 96 82 68 I_Johnson Section200 87 82 65 U_Krall Section300 94 76 80 K_Kurschat Section100 89 82 76 N_Mackool Section200 86 75 86 O_McCloskey Section300 88 90 71 A_Naeem Section100 84 76 62 E_Peck Section200 95 88 67 H_Rinke Section300 83 89 83 B_Rombach Section100 88 79 76 G_Ruan Section200 94 77 64 E_Teal Section300 86 76 88 A_Ureel Section100 93 94 83 H_Wierszewski Section200 94 94 87 S_Yasoni Section300 89 0 91 C_Anstett Section200 86 92 83 G_Bilby Section100 81 84 85 M_Bruce Section200 80 75 72 O_Cox Section200 82 92 79 I_Dushaj Section300 89 76 83 D_Ignatowski Section100 82 94 92 F_Kalinowski Section300 81 83 68 O_Lezama Section200 97 84 91 J_Marks Section300 98 88 84 L_Mckay Section300 81 87 69 C_Naschak Section100 88 90 89 G_Rhodes Section200 87 95 73 S_Ruc Section300 86 89 74 U_Shah Section100 95 93 61 N_Tingley Section200 89 92 90 P_Towne Section300 82 86 80 B_Wallace Section300 99 87 63 M_Wilmot Section100 99 94 80 H_Wilson Section200 87 95 69
Objectives Material from homework 1 and 2, and chapters 1-6 o Creating and using classes o Utilize decision and repetition structures Input from a file using iterators and Scanner objects o Use Wrapper methods o Create ArrayList and loop through them 1) Create a Class Called Student using UML on the last page a) Make sure you include all the methods as stated in UML, with the parameter lists as given. b) The public method getAvgGrade() will return the average of the student's 3 exam grades. c) The private support method calcLetterGrade () return a student's grade (char) based on the following guidelines: i) Call the method getAvgGrade to get the average grade. ii) If their average exam grade is at least 85.0, then return an A iii) else if their average exam grade is at least 78.0, then return a B iv) else if their average exam grade is at least 65.0, then return a C v) else if their average exam grade is at least 60.0, then return a D vi) else return an F d) In the toString method i) First call the calcLetterGrade () to obtain their letter grade. ii) Return only the Student's name (in uppercase), their Section Name, and their letter grade in the toString, with labels as shown in the example. In Main 2) Using the file provided on moodle called students.txt. a) Create an ArrayList of Student objects b) Open the file students.txt (downloaded from Moodle) i) Each line contains (1) stdName sectionName ex1Grade ex2Grade ex3Grade c) Loop through the file until it is empty i) Input all the info for a single student ii) Create an object for each student using the data input. Make sure you fill in all 5 pieces of data for each student using the constructor as specified, and the set methods. iii) Add the object to the end of the ArrayList d) Close the file when you run out of data 2/12/2021 1 CSI 2300 W21 3) Output the average grade per session a) Loop through all the student objects in the ArrayList i) Inside the loop use a switch structure based on the Section name (1) sum the grades of each section, and count how many students are in each section b) Output the average grades per session as shown in example output 4) Print out the following a) Loop through the ArrayList i) print out all of the students info with the toString() method. ii) sum up all the examl grades, exam2 grades and exam3 grades separately b) Output the average examl grade for all sections, average exam2 grade for all sections and average exam3 grade for all sections. Example Output (I cut out many names/grades in this output example) ----------- Problem 2----------- --Problem 3--- Average grade in Section 100 is 82.8 Average grade in Section 200 is 81.8 Average grade in Section 300 is 81.7 --Problem 4----- Student: K_AHMED Section Name: Section 100 Grade: A Student: H_ATKINS Section Name: Section 200 Grade: F Student: H_WILSON Section Name: Section 200 Grade: B Average exam 1 grade is 86.4 Average exam 2 grade is 82.6 Average exam 3 grade is is 77.3 Student - name : String - sectionName : String - examl : double - exam2 : double - exam3 : double - avgExamGrade : double + public Student(String name, String sectionName) + getName() String + getSection Name () String +getExaml () double +getExam2 () double +getExam3 ( double + getAvgGrade () double + setExaml (double newEx) void + setExam2 (double newEx) void + setExam3 (double newEx) void - calcLetterGrade() char + toString( String 2/12 W21

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago