-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPharmcyProject.java
More file actions
97 lines (81 loc) · 3.12 KB
/
Copy pathPharmcyProject.java
File metadata and controls
97 lines (81 loc) · 3.12 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
*/
package pharmcyproject;
import java.util.InputMismatchException;
import java.util.Scanner;
/**
*
* @author lamees
*/
public class PharmcyProject {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
InventoryandSales New = new InventoryandSales(" Pharmacy Inventory And Sales System ");
System.out.println("*** Welcome To " + New.getName() + " ***");
int option = 0;
do {
try {
System.out.println(
"1. Add Medicine\n"
+ "2. Search Medicine\n"
+ "3. Display all Medicine in stock\n"
+ "4. highest priced Medicine\n"
+ "5. add Prescription\n"
+ "6. Find Prescription \n"
+ "7. Display all Prescriptions\n"
+ "8. Next Prescription \n"
+ "9. Exit ");
System.out.println("Your Choice: ");
option = input.nextInt();
switch (option) {
case 1:
New.addMedicine();
System.out.println("");
break;
case 2:
New.searchMedicine();
System.out.println("");
break;
case 3:
New.displayAllMedicines();
System.out.println("");
break;
case 4:
New.highestMedicine();
System.out.println("");
break;
case 5:
New.addPrescription();
System.out.println("");
break;
case 6:
New.showPrescriptionInfo();
System.out.println("");
break;
case 7:
New.DisplayPrescription();
System.out.println("");
break;
case 8:
New.NextPrescription();
System.out.println("");
break;
case 9:
System.out.println("*************See you next time*************");
break;
default:
System.out.println("Invalid Choice ,Try Again");
}
} catch (InputMismatchException e) {
System.err.println("Invalid input");
input.next();
}
} while (option
!= 9);
}
}