1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
stiks02 [169]
3 years ago
11

Create a program that generates a report that displays a list of students, classes they are enrolled in and the professor who te

aches 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

Computers and Technology
1 answer:
Ainat [17]3 years ago
6 0

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

You might be interested in
________ results when leisure time and available tools allow us to engage in creative acts.
natta225 [31]
Cognitive surplus results when leisure time and available tools allow us to engage in creative acts. It is a term that was introduced by Clay Shirky which pertains to the synthesis of the excess of people's energy, time and creativity leading to productivity sharing and creation.
4 0
3 years ago
What parts of the computer does it not need to function?​
Thepotemich [5.8K]
Fancy lights, mouse, keyboard, you can do fan but the computer will eventually overheat, it need coolant for it to run for a long while
6 0
3 years ago
11.5 Code Practice edhesive
Tatiana [17]

Answer:

<html>

<body>

<p style="text-align:center;color:red;">This is a paragraph.</p>

<p><i> "This text is italic</i></p>

</body>

</html>

Explanation:

I got a 75%. Hope this helps.°ω°

8 0
3 years ago
Read 2 more answers
Sam works in a real estate office. An offer comes in on a house but the homeowners are on vacation. He needs the homeowners to s
Digiron [165]

Answer:

Sam should send a digital document and request a signature. The could be fax or even an image printed out, if neither is possible get in contact with eh owner and his lawyer for more help.

Explanation:

3 0
3 years ago
Protocols used in each layers in each osi reference model
natka813 [3]

The protocols  that are often used in each layers in each OSI reference model are:

Layers                           Protocols

Layer 7- Application          SMTP, HTTP, FTP, POP3, SNMP

Layer 6- Presentation           MPEG, ASCH, SSL, TLS

Layer 5-Session                   NetBIOS, SAP

Layer 4-Transport                      TCP, UDP

Layer 3-Network                IPV5, IPV6, ICMP, IPSEC, ARP, MPLS.

Layer 2-Data Link       RAPA, PPP, Frame Relay, ATM, Fiber Cable.

Layer 1-Physical              RS232, 100BaseTX, ISDN, 11.

<h3>What is OSI Model?</h3>

The OSI Model is known to be a kind of a logical and conceptual framework that tells all about network communication that is often used by systems in an open to interconnection and also in any communication with other forms of systems.

Note that the Open System Interconnection (OSI Model) is one that tells more about a logical network and it is one that also tells about computer packet transfer via the use of various layers of protocols.

Therefore, The protocols  that are often used in each layers in each OSI reference model are:

Layers                           Protocols

Layer 7- Application          SMTP, HTTP, FTP, POP3, SNMP

Layer 6- Presentation            MPEG, ASCH, SSL, TLS

Layer 5-Session                   NetBIOS, SAP

Layer 4-Transport                      TCP, UDP

Layer 3-Network                IPV5, IPV6, ICMP, IPSEC, ARP, MPLS.

Layer 2-Data Link       RAPA, PPP, Frame Relay, ATM, Fiber Cable.

Layer 1-Physical              RS232, 100BaseTX, ISDN, 11.

Learn more about OSI reference model  from

brainly.com/question/12976859

#SPJ1

8 0
2 years ago
Other questions:
  • To download a webpage, the web browser copies files and transfer them to your ____
    14·2 answers
  • When saving a document or drawing, you determine the destination folder in which the file will be saved by?
    6·1 answer
  • Write a Java program to print the result in the series 10, 15, 20, 25, ..., 50. Hint: You can use an iteration statement for wri
    9·1 answer
  • What does this image represent?
    9·2 answers
  • Which federal agency enforces safety and health legislation and requires employers to be sure that adequate first-aid supplies a
    5·1 answer
  • Able to make a survey form using VB (Visual basics 6.0) to represent ways of conservation of
    8·2 answers
  • look at sum of my horrible drawings lol these were last year XD let meh see sum of yalls art!! im not into drawing as much but i
    8·1 answer
  • When spraying pesticide wear and protective eyeglass​
    13·2 answers
  • WHO WANT P O I N T S.................................................
    9·1 answer
  • 6
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!