Question

Create a Java program for a school. Create a report containing information for a classroom. For...

Create a Java program for a school. Create a report containing information for a classroom. For each classroom, the report will contain: the room number, the teacher and subject to the class, and a list of students assigned to the class and their grade. Create a directory called “SchoolInfo". Create Displayable interface. The interface should declare one method

Create Person (abstract) class String firstName String lastName. (other classes will implement this one)

Create the Teacher class, name and subject

Create Student Class, name subject, final grade, and a random student ID

Create a Room class, with the number of the classroom and corresponding teacher and an array of the students

Include the getter and setter methods for the variables.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import java.util.Scanner;
interface display
{
void display();

}
class student implements display
{
String name,subject,final_grade,student_name;
int id;
public String getName()
{
return this.name;
}
public void setName()
{
//include more logic
student_name =getName();
}
public void display()
{
System.out.println("student_name: "+this.name+" id: "+this.id+" subject: "+this.subject+" grade: "+this.final_grade);
}

}
class room implements display
{
int no_of_classes;
int roon_num;
String teacher;
String students[]=new String[100];
public void display()
{
System.out.println("room number: "+this.roon_num);
System.out.println("student1 "+this.students[0]+" student2 :"+this.students[1]);
}
}
class teacher
{
String name,subject;

}
abstract class person
{
String first_name,last_name;

}
class school
{
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
student stu=new student();
stu.name="Rajan dev";
stu.id=176245;
stu.subject="maths";
stu.final_grade="A";
stu.display();
teacher tea=new teacher();
tea.name="mrs komolika";
room ro=new room();
ro.roon_num=3;
ro.students[0]="kajol";
ro.students[1]="katrina";

ro.display();
}
}

Add a comment
Know the answer?
Add Answer to:
Create a Java program for a school. Create a report containing information for a classroom. For...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Java Project In Brief... For this Java project, you will create a Java program for a...

    Java Project In Brief... For this Java project, you will create a Java program for a school. The purpose is to create a report containing one or more classrooms. For each classroom, the report will contain: I need a code that works, runs and the packages are working as well The room number of the classroom. The teacher and the subject assigned to the classroom. A list of students assigned to the classroom including their student id and final grade....

  • JAVA PROGRAMMING In this final review lab from our intro course, use the Name class you...

    JAVA PROGRAMMING In this final review lab from our intro course, use the Name class you created in the previous lab. In this lab, create a Student class with the following class variable: Student name: Name (Note: Name is a datatype) Student Id: String Create the getter and setter methods. In addition to these methods, create a toString() method, which overrides the object class toString() method. This override method prints the current value of any of this class object. Complete...

  • In this lab you will work with abstract classes/interfaces. (Java Program) You will be implementing a...

    In this lab you will work with abstract classes/interfaces. (Java Program) You will be implementing a basic employee schema within a company. The Employee class will be an abstract class that will contain methods applicable to all employees. You will then create 2 classes called SoftwareEngineer and ProductManager. Both are different employee types based on occupation. You will create an interface called Developer which will consist of specific methods that apply to only Developers (e.g. SoftwareEngineer class will implement this,...

  • Need to write the program.. In java language. And That the program should be according to...

    Need to write the program.. In java language. And That the program should be according to given scenario.. You need to design and implement the following structure for your organization. You must follow the instructions given below 1 - Name of you organization is your surname. For example, if your name is "Qasim Ali", then "Ali" will be organization name. 2- Organization and Person must be interfaces. 3 - Staff and infrastructure must be abstract classes. 4 - Rest of...

  • FOR JAVA: Summary: Create a program that adds students to the class list (see below). The...

    FOR JAVA: Summary: Create a program that adds students to the class list (see below). The solution should be named Roster402_v2.java. Allow the user to control the number of students added to the roster. Ask if the user would like to see their new roster to confirm additions. If yes, then display contents of the file, if no, end the program. ------------------------------------------------------------------------------------- List of student names and IDs for class (this will be your separate text file): Jones, Jim,45 Hicks,...

  • ( Object array + input) Write a Java program to meet the following requirements: 1. Define...

    ( Object array + input) Write a Java program to meet the following requirements: 1. Define a class called Student which contains: 1.1 data fields: a. An integer data field contains student id b. Two String data fields named firstname and lastname c. A String data field contains student’s email address 1.2 methods: a. A no-arg constructor that will create a default student object. b. A constructor that creates a student with the specified student id, firstname, lastname and email_address...

  • Here is the code from the previous three steps: #include <iostream> using namespace std; class Student...

    Here is the code from the previous three steps: #include <iostream> using namespace std; class Student { private: //class variables int ID; string firstName,lastName; public: Student(int ID,string firstName,string lastName) //constructor { this->ID=ID; this->firstName=firstName; this->lastName=lastName; } int getID() //getter method { return ID; } virtual string getType() = 0; //pure virtual function virtual void printInfo() //virtual function to print basic details of a student { cout << "Student type: " << getType() << endl; cout << "Student ID: " << ID...

  • Write a program in C++ with comments! Create an abstract class Property, containing the data items...

    Write a program in C++ with comments! Create an abstract class Property, containing the data items owner, address and price. Add an abstract method showOwner(). Also provide getter/setters for all the data items. Make validations if necessary in the setter so that no invalid values are entered. Create a class House, to inherit the Property class. This class should contain additional data item – yardSize – an integer – the size of the yard of the house, getter and setter...

  • You will create an Microsoft Access School Management System Database that can be used to store,...

    You will create an Microsoft Access School Management System Database that can be used to store, retrieve update and delete the staff/student. Design an Access database to maintain information about school staff and students satisfying the following properties: 1. The staff should have the following: ID#, name, and classes they are teaching 2. The student should have the following: ID#, name, section, class 3. Create a module containing the section, subject and teacher information 4. Create a module containing student...

  • in java • Create an interface called Person. In this interface create a method called printData()...

    in java • Create an interface called Person. In this interface create a method called printData() • Implement interface Person by classes Student, Teacher, Admin. You need to think the relevant data attributes for each class. Define atleast 4 attributes for each class. • In each class override a method toString() and create a string which holds all data • In the method printData in each class print the data using toString() method. Design the UML and write a code...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT