Could someone help me please? Thank you 1.) /** * Calculates the tuition for eac
ID: 639597 • Letter: C
Question
Could someone help me please? Thank you
1.) /**
* Calculates the tuition for each student. Write an enhanced for loop that iterates over each Student in
* pStudentList. For each Student, call calcTuition() on that Student. Note: this is a polymorphic method
* call.
*
* PSEUDOCODE
* EnhancedFor each student in pStudentList Do
* student.calcTuition()
* End EnhancedFor
*/
private void calcTuition(ArrayList pStudentList) {
//write your code here
2.) /**
* Reads the information for an online student.
*
* PSEUDOCODE
* Declare String object id and assign pIn.next() to id
* Declare String object named lname and assign pIn.next() to lname
* Declare String object named fname and assign pIn.next() to fname
* Declare and create an OnlineStudent object. Pass id, fname, lname as params to the ctor.,
* Declare String object named fee and assign pIn.next() to fee
* Declare int variable named credits and assign pIn.nextInt() to credits
* If fee.equals("T")) Then
* Call setTechFee(true) on student
* Else
* Call setTechFee(false) on student
* End If
* Call setCredits(credits) on student
* Return student
*/
private OnlineStudent readOnlineStudent(Scanner pIn) {
//write your code here
}
3.)/**
* Writes the output file to "p02-tuition.txt" per the software requirements.
*
* PSEUDOCODE
* Declare and create a PrintWriter object named out. Open "p02-tuition.txt" for writing.
* EnhancedFor each student in pStudentList Do
* out.print(student id + " " + student last name + " " + student first name)
* out.printf("%.2f%n" student tuition)
* End EnhancedFor
*/
private void writeFile(ArrayList<Student> pStudentList) throws FileNotFoundException {
Requirements:
Student information is stored in a text file named p02-students.txt. There is one student record per line, where the format of a student record for an on-campus student is:
C id last-name first-name residency program-fee credits where:
'C'
id last-name first-name residency program-fee credits
Identifies the student as an on-campus student.
The student identifier number. A string of 13 digits.
The student's last name. A contiguous string of characters.
The student's first name. A contiguous string of characters.
'R' if the student is a resident, 'N' if the student is a non-resident. A program fee, which may be zero.
The number of credit hours for which the student is enrolled.
The format of a student record for an online student is:
O id last-name first-name tech-fee credits
where 'O' identifies the student as an online student, and id, last-name, first-name, and credits are the same as for an on-campus student. The tech-fee field is 'T' if the student is to be assessed the technology fee or '-' if the student is not assessed the technology fee.