Question: -JAVA LANGUAGE - MUST APPLY GUI -If you can't do it please don't answer this question -I will upvote you if you are fulfiled all
-JAVA LANGUAGE
- MUST APPLY GUI
-If you can't do it please don't answer this question
-I will upvote you if you are fulfiled all the requirement
- You are free to design / change the any code.
-You only can use array method to solve it. Cannot use the arraylist and linked list method.
Array size = 100
-In GUI
6 functions:
- Add the new rental record
- Search the rental record
-custID (customer ID must be unique, cannot be duplicated)
- all the customer objects are arrange in ascending order based on their custID;
- Delete the rental record
- Update the rental record
- Display today rental record (display the stored rental info from the Array in the text area)
- Display all the rental record (display all stored rental info from the text file in text area)
- Exit the system
1. CustomerInfo Class
public class CustInfo {
int custAge, custContactNo;
String custID, custName, custGender, custEmail, custAddress;
public CustomerInfo(String cN, int cA, String cG, String cE, String custAdd, String cID, int custCNo) {
custID = cID;
custName = cN;
custAge = cA;
custGender = cG;
custContactNo = custCNo;
custEmail = cE;
custAddress = custAdd;
}
public String getCustID() {
return custID;
}
public String getCustName() {
return custName;
}
public int getCustAge() {
return custAge;
}
public String custGender() {
return custGender;
}
public int getCustContactNo() {
return custContactNo;
}
public String getCustEmail() {
return custEmail;
}
public String custAddress() {
return custAddress;
}
public void setCustID(String cID) {
this.custID = cID;
}
public void setCustName(String cN) {
this.custName = cN;
}
public void setCustAge(int cA) {
this.custAge = cA;
}
public void setGustGender(String cG) {
this.custGender = cG;
}
public void setCustContactNo(int custCNo) {
this.custContactNo = custCNo;
}
public void setCustEmail(String custEmail) {
this.custEmail = custEmail;
}
public void setCustAddress(String custAdd) {
this.custAddress = custAdd;
}
}
2. RentalInfo Class
public class RentalInfo {
int guestNum;
int checkInDate, checkOutDate;
public RentalInfo(int gN, int cIDate, int cODate) {
guestNum = gN;
checkInDate = cIDate;
checkOutDate = cODate;
}
public int getGuestNum() {
return guestNum;
}
public int getCheckInDate() {
return checkInDate;
}
public int getCheckOutDate() {
return checkOutDate;
}
public void setGuestNum(int gN) {
this.guestNum = gN;
}
public void setCheckInDate(int cIDate) {
this.checkInDate = cIDate;
}
public void setCheckOutDate(int cODate) {
this.checkOutDate = cODate;
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
