forked from dharmanshu1921/Java
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5.java
More file actions
Latest commit
19 lines (18 loc) · 1.03 KB
/
Copy path5.java
File metadata and controls
19 lines (18 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importjava.util.*;
publicclasstempCodeRunnerFile {
Stringname, add, bg, staff, treatment; intage;
doublebill = 0;
publicvoidPatientDetails(){
Scannersc = newScanner(System.in); System.out.print("Enter your name - "); name = sc.nextLine(); System.out.print("Enter your age - "); age = sc.nextInt();
sc.nextLine();
System.out.print("Enter your address - "); add = sc.nextLine();
System.out.print("Enter your blood group - "); bg = sc.nextLine(); System.out.print("Assigned Staff - ");
staff = sc.nextLine(); System.out.print("Treatment - "); treatment = sc.nextLine();
};
publicvoidShowPatient(){ PatientDetails(); System.out.println("Name - " + name); System.out.println("Age - " + age); System.out.println("Address - " + add);
System.out.println("Blood group - " + bg); System.out.println("Assigned staff - " + staff); System.out.println("Treatment - " + treatment);
}
publicvoidBloodNeed(){
if (bg.equalsIgnoreCase("O")){ bill += 2000;
} elseif (bg.equalsIgnoreCase("A")){ bill += 2100;
} elseif (bg.equalsIgnoreCase