Uploaded by naveedalam1414

Quiz3 - winter (1)(1)(1)(1)

advertisement
Reg. # 2018-IT-039__Section __A______
Engineering
Name Naveed alam Department: Computer
Program: B.E (CE)
Quiz 3
CE-206 Advanced Object Oriented Programming
Date :
Allowed Time: 20 minutes
Total Marks = 2
Marks Obtained =
Teacher Name: Umme Laila
(CLO_3): (Cognitive Level C3, i.e., Applying) (PLO_3 i.e. Design & Development of
Solution )
QUESTION# 1: Create a Database table Customer represents a customer of a bank. Each customer has
the following fields: Customer Name, country, Gender, Hobbies, material status.
Use Java GUI widget toolkit to develop a GUI interface for customer table and handle DML
events and for data navigation of customer details. The GUI should look closely like the
following.
Package customer bank table;
Import java.io.Serializable;
Public class Customer implements Serializable{
Static final String USER = “username”;
Static final String Country = “Country”;
Static final String Gender = “Gender”;
Static final String Hobbies = “Hobbies”;
Public static void main(String[] args) {
Private final String customer name;
Private final String country ;;
Customer(String customer name, String country,) {
This.custmername = firstName;
This.country = lastName;
}
@Override
Public String toString(){
Return “\nCustomer Information\n” +
“First Name: “ + getcustmername() + “\n” +
“Last Name: “ + getcountry() + “\n” +
}
Public String basicInfo(){
Return “ Account Number: “ + account.getAccountNumber() + “ – Name: “ + getFirstName() + “ “ +
getLastName();
}
Account getAccount(){
Return account;
}
/**
* @return the customer name
*/
Public String getcustmername() {
Return customername;
}
/**
* @return the lastName
*/
Public String getcountry() {
Return country;
}
}
Download