-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathText.java
More file actions
56 lines (49 loc) · 2.03 KB
/
Copy pathText.java
File metadata and controls
56 lines (49 loc) · 2.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
public class Text {
// public static void main(String[] args) {
// printTitle("hello world");
// System.out.print("\n");
// System.out.printf("%-40s","[1] Change the Credentials");
// System.out.println("[2] Supplier Manage");
// System.out.printf("%-40s","[3] Stock Manage");
// System.out.println("[4] Log Out");
// System.out.printf("%-40s","[5] Exit the System");
// }
public static void printTitle(String title) {
String line = ("--------------------------------------------------------------------------------------------------");
// System.out.println(line.length());
// System.out.println(title.length());
System.out.println("+" + line + "+");
int before = (line.length() - title.length()) / 2;
System.out.printf("|%" + before + "s", "");
System.out.print(title);
int after = (line.length() - title.length()) - before;
System.out.printf("%" + after + "s", "");
System.out.println("|");
System.out.println("+" + line + "+");
}
// }
// public static String[] removeRow(String[] array, int removedRow) {
// int row = array.length;
// String[] tempArray = new String[row - 1];
// for (int i = 0, k = 0; i < row; i++) {
// if (i == removedRow) {
// continue;
// }
// tempArray[k] = array[i];
// k++;
// }
// array = tempArray;
// return array;
// }
public static void stockManage() {
printTitle("STOCK MANAGEMENT");
System.out.println("\n");
System.out.printf("%-40s","[1] Manage Item Categories");
System.out.println("[2] Add Item");
System.out.printf("%-40","[3] Get Items Supplier Wise");
System.out.println("[4] View Items");
System.out.printf("%-40","[5] Rank Items Per Unit Price");
System.out.println("[6] Home Page");
System.out.println("\n");
}
}