-
Notifications
You must be signed in to change notification settings - Fork 88
/
Classroom.java
executable file
·46 lines (37 loc) · 1.14 KB
/
Classroom.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import java.util.*;
import greenfoot.*;
import java.util.ArrayList;
// (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Classroom here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Classroom extends World
{
private ArrayList<Object> listo = new ArrayList<Object>();
/**
* Constructor for objects of class Classroom.
*
*/
public Classroom()
{
// Create a new world with 10x6 cells with a cell size of 130x130 pixels.
super(10, 6, 130);
prepare();
}
/**
* Prepare the world for the start of the program. That is: create the initial
* objects and add them to the world.
*/
private void prepare()
{
// Add three lines to this doc with your class constructor and your row and seat number
// Make sure to match your first and last name to the class file you created.
/* Example */
KilgoreTrout kilgoretrout = new KilgoreTrout("Kilgore", "Trout", 1, 1);
addObject(kilgoretrout, 1, 1);
kilgoretrout.sitDown();
}
}