Eva Trope
Yeshiva College
Coding Document
,Table of Contents
App……………………………………………………………………………………………………………………………………………………3
Classes………………………………………………………………………………………………….……………………………………………4
Client…………………………………………………………………………………………………………………………………….4
ClientManager………………………………………………………………………………………………………………………6
ClientValidation…………………………………………………………………………………………………………………….9
ConnectDB………………………………………………………………………………………………………………………….11
Product……………………………………………………………………………………………………………………………….13
ProductManager…………………………………………………………………………………………………………………15
ProductValidation……………………………………………………………………………………………………………….19
Sale…………………………………………………………………………………………………………………………….……….21
SaleManager………………………………………………………………………………………………………………….……24
SaleValidation………………………………………………………………………………………………..……………………27
View…………………………………………..……………………………………………………………………………………………………31
AddClientScreen…………………………………………………………………………………………..……………………..31
AddProductScreen………………………………………………………………………………………………………………33
AddSaleScreen…………………………………………………………………………………………………………….………35
AnalyticsOptionsScreen………………………………………………………………………………………………………38
ClientAnalyticsScreen………………………………………………………………………………………………….………41
ClientScreen……………………………………….…………………………………………………………………….…………45
EditClientScreen…………………………………………………………………………………………………….……………49
EditProductScreen……………………………………………………………………………………………………….………52
EditSaleScreen…………………………………………………………………………………………………….………………55
LoginScreen…………………………………………………………………………………………………………………………59
ProductScreen……………………………………….……………………………………………………………………………62
ProvinceAnalyticsScreen……………………………………………………………………………………………………..66
SaleScreen…………………………………………………………………………………………………………………………..70
SalesAnalyticsScreen…………………………………………………………………………………………….....…………74
2
, App
1 package app;
2
3 import view.LoginScreen;
4
5 public class app {
6
7 public static void main(String[] args) {
8 // Create an instance of the LoginScreen view
9 LoginScreen loginScreen = new LoginScreen();
10
11 // Set the visibility of the LoginScreen to true, making it visible to the
user
12 loginScreen.setVisible(true);
13 }
14
15 }
16
3
, Classes
1 package classes;
2
3 // The Client class represents a client with properties such as ID, name, and
area.
4
5 public class Client {
6
7 private int clientID; // Private variable to store the client ID.
8 private String clientName; // Private variable to store the client name.
9 private String area; // Private variable to store the area of the client.
10 private String area2; // Private variable to store additional information
(email) about the client.
11
12 // Constructor that initializes a Client object with the specified ID, name,
area, and email.
13 public Client(int clientID, String clientName, String area, String email) {
14 this.clientID = clientID;
15 this.clientName = clientName;
16 this.area = area;
17 this.area2 = email;
18 }
19
20 // Constructor that initializes a Client object with the specified name,
area, and email.
21 public Client(String clientName, String area, String email) {
22 this.clientName = clientName;
23 this.area = area;
24 this.area2 = email;
25 }
26
27 // Method to get the client ID.
28 public int getClientID() {
29 return clientID;
30 }
31
32 // Method to set the client ID.
33 public void setClientID(int clientID) {
34 this.clientID = clientID;
35 }
36
37 // Method to get the client name.
4
Yeshiva College
Coding Document
,Table of Contents
App……………………………………………………………………………………………………………………………………………………3
Classes………………………………………………………………………………………………….……………………………………………4
Client…………………………………………………………………………………………………………………………………….4
ClientManager………………………………………………………………………………………………………………………6
ClientValidation…………………………………………………………………………………………………………………….9
ConnectDB………………………………………………………………………………………………………………………….11
Product……………………………………………………………………………………………………………………………….13
ProductManager…………………………………………………………………………………………………………………15
ProductValidation……………………………………………………………………………………………………………….19
Sale…………………………………………………………………………………………………………………………….……….21
SaleManager………………………………………………………………………………………………………………….……24
SaleValidation………………………………………………………………………………………………..……………………27
View…………………………………………..……………………………………………………………………………………………………31
AddClientScreen…………………………………………………………………………………………..……………………..31
AddProductScreen………………………………………………………………………………………………………………33
AddSaleScreen…………………………………………………………………………………………………………….………35
AnalyticsOptionsScreen………………………………………………………………………………………………………38
ClientAnalyticsScreen………………………………………………………………………………………………….………41
ClientScreen……………………………………….…………………………………………………………………….…………45
EditClientScreen…………………………………………………………………………………………………….……………49
EditProductScreen……………………………………………………………………………………………………….………52
EditSaleScreen…………………………………………………………………………………………………….………………55
LoginScreen…………………………………………………………………………………………………………………………59
ProductScreen……………………………………….……………………………………………………………………………62
ProvinceAnalyticsScreen……………………………………………………………………………………………………..66
SaleScreen…………………………………………………………………………………………………………………………..70
SalesAnalyticsScreen…………………………………………………………………………………………….....…………74
2
, App
1 package app;
2
3 import view.LoginScreen;
4
5 public class app {
6
7 public static void main(String[] args) {
8 // Create an instance of the LoginScreen view
9 LoginScreen loginScreen = new LoginScreen();
10
11 // Set the visibility of the LoginScreen to true, making it visible to the
user
12 loginScreen.setVisible(true);
13 }
14
15 }
16
3
, Classes
1 package classes;
2
3 // The Client class represents a client with properties such as ID, name, and
area.
4
5 public class Client {
6
7 private int clientID; // Private variable to store the client ID.
8 private String clientName; // Private variable to store the client name.
9 private String area; // Private variable to store the area of the client.
10 private String area2; // Private variable to store additional information
(email) about the client.
11
12 // Constructor that initializes a Client object with the specified ID, name,
area, and email.
13 public Client(int clientID, String clientName, String area, String email) {
14 this.clientID = clientID;
15 this.clientName = clientName;
16 this.area = area;
17 this.area2 = email;
18 }
19
20 // Constructor that initializes a Client object with the specified name,
area, and email.
21 public Client(String clientName, String area, String email) {
22 this.clientName = clientName;
23 this.area = area;
24 this.area2 = email;
25 }
26
27 // Method to get the client ID.
28 public int getClientID() {
29 return clientID;
30 }
31
32 // Method to set the client ID.
33 public void setClientID(int clientID) {
34 this.clientID = clientID;
35 }
36
37 // Method to get the client name.
4