Answered step by step
Verified Expert Solution
Question
1 Approved Answer
student.txt : 01 Jill f 21.7 02 Sarah f 20.8 03 Calem m 23.4 04 Richard m 44.2 05 Lisa f 17.6 06 Megan f
student.txt :
01 Jill f 21.7
02 Sarah f 20.8
03 Calem m 23.4
04 Richard m 44.2
05 Lisa f 17.6
06 Megan f 22.1
07 Adam m 24.3
08 Natalie f 29.8
09 Caitlyn f 24.4
10 Matthew m 19.3
11 Mo m 26.1
12 Nicky f 22.5
13 Cory m 27.3
14 Carrie f 26.2
15 Sam f 32.8
16 Yuki f 18.6
17 Jessica f 20.7
18 Susan f 33.4
19 Josey f 24.2
20 Bob m 26.1
CLASSESARRAYLISTS D) (20 pts.) - This assignment revisits the student parsing program from Project 6, but challenges you to restructure the component pieces of the program to create a cleaner, more concise Main) You will generate a MyStudent class of object and load an array with student objects, then report the contents of that array. To accomplish this, you must perform the following: ?) (1 / pts ) - Generate a class file "Mstudent.class" (which is generated after you create and compile the "MyStudent.java" file) MyStudent.java will have the following public methods 1) student () Holds four fields of data, ID, name, gender, and age 2 readData (String fileName) - Reads a text file, the 'fileName' parameter 3) howMany (String gender) - Print the number of students of the selected gender 4) studentist(String gender)- List of students of the selected gender 5) age (int value) Generates a list of students whose age is greater than or equal to 'value' parameter 6) avgAge (String gender) - Print the average age of students of the selected gender B) 5/20 pts. )- Once your MyStudent.java is functional, generate a file "Proj08_Classes.java". Proj08_Classes.java should contain only a Main() method that performs the following 1) Instantiate a new object of the MyStudent class. 2) Calls the new object and use its methods a) readData) passing an argument of a file name b) howMany)-passing an argument of a gender c) studentList()-passing an argument of a gender d) age) passing an argument of an age e avgAgel) - passing an argument of a gender 3) The main() method of Proj08 Classes.java may not contain more than 12 lines of code a) This total does not include comments and documentation b) This total does not include optional criteria or formatting improvements to your output. )- Include appropriate program documentation and formatting including: 1) 2) 3) 4) 5) Your first and last name, your email information, and the date A short description of the program's function Comments necessary to explain your code Proper indentation and convention Correct outputStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started