Create a program that generates a report that displays a list of students, classes they are enrolled in and the professor who teaches that class. There are 3 files that provide the input data: 1. FinalRoster.txt : List of students and professors ( S: student, P: professor) Student row: S,Student Name, StudentID Professor row: P, Professor Name, Professor ID, Highest Education 2. FinalClassList.txt: List of classes and professor who teach them (ClassID, ClassName, ID of Professor who teach that class) 3. FinalStudentClassList.txt: List of classes the students are enrolled in. (StudentID, ClassID) The output shall be displayed on screen and stored in a file in the format described in FinalOutput.txt You will need to apply all course concepts in your solution. 1. Student and Professor should be derived from a super class "Person" 2. Every class should implement toString method to return data in the format required for output 3. Exception handling (e.g. FileNotFound etc.) must be implemented 4. Source code must be documented in JavaDoc format 5. Do not hard code number of students, professors or classes. Submit source Java files, the output file and screenshot of the output in a zip format

Answers

Answer 1

Answer:

All the classes are mentioned with code and screenshots. . That class is shown at last.

Explanation:

Solution

Class.Java:

Code

**

* atauthor your_name

* This class denotes Class at the college.

*

*/

public class Class {

 

  private String className,classID;

  private Professor professor;

 

  /**

  * atparam className

  * atparam classID

  * atparam professor

  */

  public Class(String className, String classID, Professor professor) {

      this.classID=classID;

      this.className=className;

      this.professor=professor;

  }

     /**

  * at return classID of the class

  */

  public String getClassID() {

      return classID;

  }

    /**

  * Override toString() from Object Class

  */

  public String toString() {    

      return classID+" "+className+" "+professor.getName()+" "+professor.getEducation();        

  }  

}

Person.Java:

Code:

/**

* atauthor your_name

* This class represents Person

*

*/

public class Person {    

  protected String name;  

  /**method to fetch name

  * at return

  */

  public String getName() {

      return name;

  }

  /**method to set name

  * at param name

  */

  public void setName(String name) {

      this.name = name;

  }

Professor.java:

Code:

import java.util.ArrayList;

import java.util.List;  

/**

* at author your_name

*

*This class represents professors

*

*/

public class Professor extends Person{    

  private String professorID, education;

  private List<Class> classes=new ArrayList<Class>();    

  /**

  * at param name

  * at param professorID

  * at param education

  */

  public Professor(String name,String professorID,String education) {        

      this.name=name;

      this.professorID=professorID;

      this.education=education;        

  }

  /**

  * at return

  */

  public String getEducation() {

      return this.education;

  }    

  /**

  * at return

  */

  public String getprofessorID() {

      return this.professorID;

  }  

  /** to add classes

  * at param Class

  */

  public void addClass(Class c) {

      classes.add(c);

  }  

  /**

  * Override toString() from Object Class

  */

  public String toString() {

      String result=this.getName()+" - "+professorID+" - "+education;

      for(Class c:classes) {

          result+=c.toString()+"\n";

      }      

      return result;

  }

}

}

Student.java:

Code:

import java.util.ArrayList;

import java.util.List;  

/**

* This class represents students

*  at author your_Name

*

*/

public class Student extends Person{    

  private String studentID;

  private List<Class> classes=new ArrayList<Class>();    

  /**

  * atparam name

  * atparam studentID

  */

  public Student(String name,String studentID) {      

      this.name=name;

      this.studentID=studentID;      

  }  

  /**

  * atreturn

  */

  public String getStudentID() {

      return studentID;

  }

     /**

  * atparam c

  */

  public void addClass(Class c) {

      classes.add(c);

  }    

  /**

  * atreturn

  */

  public int getClassCount() {

      return classes.size();

  }

  /**

  * Override toString() from Object Class

  */

  public String toString() {

      String result=this.getName()+" - "+studentID+"\n";

      for(Class c:classes) {

          result+=c.toString()+"\n";

      }    

      return result;

  }  

}

NOTE: Kindly find an attached copy of screenshot of the output, which is a part of the solution to this question

Create A Program That Generates A Report That Displays A List Of Students, Classes They Are Enrolled
Create A Program That Generates A Report That Displays A List Of Students, Classes They Are Enrolled
Create A Program That Generates A Report That Displays A List Of Students, Classes They Are Enrolled
Create A Program That Generates A Report That Displays A List Of Students, Classes They Are Enrolled
Create A Program That Generates A Report That Displays A List Of Students, Classes They Are Enrolled

Related Questions

Other Questions
Why do you need to consider the cost of dye when choosing materials for clothing? (for fashIon please write a couple sentences) A basketball has a circumference of 31.4 inches. Using 3.14 as an approximation for pie, what is the basketball's volume to the nearest cubic inch? A graph showing net profits and losses for 2003 which of the four DNA strands match the strand in the diagram by base pairing ? Eric created a rectangular patio 1 ft. paving stones which are sold in batches by a dozen the patio measures 7 x 8 how many batches of Pavingstone did Eric need How should public school officials strike a balancebetween protecting a student's legitimate expectationsof privacy and the school's legitimate need to maintaina safe environment in which learning can take place? Within a population of butterflies, the color brown (B) is dominant over the color white (b) and 32% of all butterflies are white. Given this simple information, which is something that is very likely to be on an exam (teehee), calculate the following: 1. The percentage of butterflies in the population that are homozygous dominant 2. The number of heterozygous butterflies if the population contained 4,216 individuals Find the measure of x.15(x+2)X=-1x = 7X = 9x=13 Which 2 numbers have a least common multiple of 36? Measure of angle r is 22. Find the measure of angle 0 Kristen made sails for a model boat. She cut along the diagonal of a rectangular piece of cloth to make two sails, shown.A) 2 1/3 ftB) 2 7/12 ftC) 4 2/3 ftD) 9 1/3 ft At Pizza Pi, 80% of the pizzas made last week had extra cheese. If 16 pizzas had extracheese, how many pizzas in all were made last week? Social interaction is an important part of team activities. Which of the following is an example of a positive consequence of social interaction: Question 1 options: You make enemies with rivals. You meet people who have a common interest and goal. You meet negative people. what is the meaning of consideration? Element X decays radioactively with a half-life of 14 minutes if there are 680 grams of element X how long to the nearest 10th of a minute would it take the element to decay 17 grams how did japan change during the Heian empire/period Whats is the 6+8-16 Poe Company is considering the purchase of new equipment costing $80,000. The projected net cash flows are $35,000 for the first two years and $30,000 for years three and four. The revenue is to be received at the end of each year. The machine has a useful life of 4 years and no salvage value. Poe requires a 10% return on its investments. The present value of $1 and present value of an annuity of $1 for different periods is presented below. Compute the net present value of the machine.Periods Present Valueof $1 at 10% Present Value of anAnnuity of $1 at 10%1 0.9091 0.90912 0.8264 1.73553 0.7514 2.48694 0.6830 3.1699 Another angle math problem. I just dont get it Help please. The radius of a cylindrical water tank is 6.5 ft, and its height is 11 ft. What is the volume of the tank? Use the value 3.14 for pie, and round your answer to the nearest whole number. Be sure to include the correct unit in your answer.