We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 628e577 commit f0b15f5Copy full SHA for f0b15f5
2 files changed
Basics/GettersAndSetters/MyMain.java
@@ -0,0 +1,10 @@
1
+public class MyMain {
2
+ public static void main(String[] args) {
3
+ Recepitionist recep1 = new Recepitionist();
4
+
5
+ recep1.setID(12);
6
+ int id = recep1.getID();
7
8
+ System.out.println(id);
9
+ }
10
+}
Basics/GettersAndSetters/Recepitionist.java
@@ -0,0 +1,23 @@
+public class Recepitionist {
+ private int staffID;
+ private String name;
+ private String telephoneNumber;
+ // Setter
+ public void setID(int ID) {
+ this.staffID = ID;
11
+ // Getter
12
+ public int getID() {
13
+ return this.staffID;
14
15
16
+ public Boolean checkRoomAvailability(int roomNumber){
17
+ return true;
18
19
+ public double generateBill(){
20
+ return 0;
21
22
+ public void takeCustomerFeddback() { }
23
0 commit comments