forked from txs72/JavaTutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourse.java
More file actions
executable file
·36 lines (34 loc) · 1.03 KB
/
Course.java
File metadata and controls
executable file
·36 lines (34 loc) · 1.03 KB
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
/* */ package ch10;
/* */
/* */ public class Course {
/* */ private String courseName;
/* 5 */ private String[] students = new String[100];
/* */ private int numberOfStudents;
/* */
/* */ public Course(String courseName) {
/* 9 */ this.courseName = courseName;
/* */ }
/* */
/* */ public void addStudent(String student) {
/* 13 */ this.students[this.numberOfStudents] = student;
/* 14 */ this.numberOfStudents++;
/* */ }
/* */
/* */ public String[] getStudents() {
/* 18 */ return this.students;
/* */ }
/* */
/* */ public int getNumberOfStudents() {
/* 22 */ return this.numberOfStudents;
/* */ }
/* */
/* */ public String getCourseName() {
/* 26 */ return this.courseName;
/* */ }
/* */
/* */ public void dropStudent(String student) {}
/* */ }
/* Location: /Volumes/TXS.128G/hope useful/practice/2020.jar!/ch10/Course.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/