Skip to content

πŸ“šπŸ§‘β€πŸŽ“πŸ‘¨β€πŸ« A simple school simulator in Java, in which students arrive at a school, which operates for some hours and is evacuated afterwards. The fatigue of the students and the teachers is also computed.

Notifications You must be signed in to change notification settings

giannisdravilas/SchoolSimulator_Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SchoolSimulator in Java

πŸ“šπŸ§‘β€πŸŽ“πŸ‘¨β€πŸ« A simple school simulator in Java, in which students arrive at a school, which operates for some hours and is evacuated afterwards. The fatigue of the students and the teachers is also computed.

General description

A school consists of three floors, a yard and a staircase. Every floor consists of six classrooms and a corridor. Every classroom contains a maximum of Cclass students and a teacher. Every student is classified either as a junior or a senior one. Every student and teacher has a fatigue meter (Lj for junior students, Ls for senior students, Lt for teachers). For every hour a student attends a lesson or a teacher teaches a lesson, the fatigue meter is increased by Lj, Ls or Lt correspondingly. Finally, the students and teachers evacuate the school by exiting it.

In a main() function, a school and some students and teachers are created. Then the students and teachers enter at it in a random order and the school operates for N hours. Finally, the school life is printed and then the school is evacuated.

Compile with:
javac Areas/Classroom.java
javac Areas/Corridor.java
javac Areas/Floor.java
javac Areas/School.java
javac Areas/Space.java
javac Areas/Stairs.java
javac Areas/Yard.java
javac People/Person.java
javac People/Student.java
javac People/StudentJunior.java
javac People/StudentSenior.java
javac People/Teacher.java
javac Main.java
Execute java Main Cclass Lj Ls Lt N, where Cclass is the maximum number of students in each classroom, Lj, Ls and Lt are the fatigue meters according to which the fatigue of the junior and senior students and teachers are increased, and N are the hours for which the school operates. E.g. java Main 10 1 2 3 10.

About

πŸ“šπŸ§‘β€πŸŽ“πŸ‘¨β€πŸ« A simple school simulator in Java, in which students arrive at a school, which operates for some hours and is evacuated afterwards. The fatigue of the students and the teachers is also computed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages