Question: public class Course { private String code; private String name; private int credit; private String grade; public Course() { code=; name=; credit=0; grade=; } /**

 public class Course { private String code; private String name; privateint credit; private String grade; public Course() { code=""; name=""; credit=0; grade="";} /** Create a course with a given name, credit and grade.@param name the name @param credit the credit @param grade the grade

public class Course { private String code; private String name; private int credit; private String grade;

public Course() { code=""; name=""; credit=0; grade=""; } /** Create a course with a given name, credit and grade. @param name the name @param credit the credit @param grade the grade */ public Course(String code, String name, int credit, String grade ) { this.code = code; this.name = name; this.credit = credit; this.grade=grade; }

/** Get the course code. @return the code */ public String getCode() { return code; } /** Change the course code. @param code the code */ public void setCode(String code) { this.code = code; } /** Get the name. @return the name */ public String getName() { return name; } /** Change the name. @param name the name */ public void setName(String name) { this.name = name; } /** Get the credit. @return the credit */ public int getCredit() { return credit; } /** Change the credit. @param credit the credit */ public void setCredit(int credit) { this.credit=credit; }

/** Get the grade. @return the grade */ public String getGrade() { return grade; } /** Change the grade. @param grade the grade */ public void setGrade(String grade) { this.grade = grade; } /** Convert course to string form. */ public String toString() { return " " + code + "\t" + name + "\t" + credit + "\t" + grade; } }

What's in the text file v

CPSC141 Computer_Organization 3 D

CPSC130 Computer_ProgrammingI 3 B

Math140 Calculus_I 4 E

CPSC232 Assembler_Languages 3 B

CPSC131 Computer_ProgramingII 3 A

Math141 Calculus_II 4 B

^^

Im Having problems trying to figure out this program i been doing this for a week now and cant seem to get the answer right

1 Description of the Program In this assignment, you are asked to do the following things 1. Read the courses from a file ("courses.txt"), and store them into a sorted linked list of courses 2. Remove all failed courses from the list 3. Add some retaken courses into the list; 4. Find the courses with " A" from the list; After completing each task, you should print the linked list. Your outputs should look like the following screenshot A sorted list of courses taken so far (imported from a file): -CPSC130 Computer_ProgrammingI3 -CPSC131 Computer_ProgramingII 3 -> CPSC141 Computer-organization 3 CPSC232 Assembler_Languages 3 -Math140 Calculus I -Math141 Calculus II A sorted list of courses after removing failed courses: -CPSC130 Computer_ProgrammingI 3 -CPSC131 Computer_ProgramingII 3 -CPSC232 Assembler_Languages 3 ->Math141 Calculus II A sorted list of courses after adding retaken courses

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!