-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourse.java
More file actions
25 lines (19 loc) · 937 Bytes
/
Course.java
File metadata and controls
25 lines (19 loc) · 937 Bytes
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
import java.awt.*;
public class Course implements AnimationEntity {
public Course(String namee, int minTokenss, int initialStudents, Color col,int xx, int yy, int widthh, int heightt) {
name=namee; color=col; minTokens=minTokenss; currently_enrolled_number=initialStudents;
x=xx; y=yy; width=widthh; height=heightt;
}
public int x,y,width,height,currently_enrolled_number,minTokens;
public String name;
public Color color;
public void draw(Graphics2D g2d) {
g2d.setPaint(color);
g2d.fillRect(x,y,width,height);//x,y,with,height
g2d.setPaint(Color.BLACK);
g2d.drawString(name,x+5,y+15);
g2d.drawString("Min Tokens : "+ Integer.toString(minTokens) ,x+5,y+45);
g2d.drawString("Students : "+ Integer.toString(currently_enrolled_number) ,x+5,y+75);
}
public void act(double deltaTime) {}
}