Summer Java 1 Exams
Summer Java 1 Exams
TECHNOLOGIES
SUMMER 2023
FINAL EXAMINATION
COURSE TITLE: JAVA 1
COURSE CODE: ICT
INSTRUCTOR: Serh Jeff
DUE DATE: 06/08/2023
DURATION: TWO WEEKS
Instructions
Answer all Questions
In each method provided include comments describing set method in your ide
Follow the procedure provided in each abstract class to generate the code
The names and declarations of your methods, class, constructor, fields, Access, type
and properties should be as provided in the tables below, anything otherwise will be
penalized.
Student are required to understand the application before submission and presentation
Question 01
Page 1 of 3
<<ABSTRACT>>
Framework BankAcc
-int accNo
-int accNm
<<ABSTRACT>> -int accBal
BankFactory
+void withdraw(float)
SavingAcc getNewSavingAccount() +void deposite(float)
CurrentAcc getNewCurrentAccount() +String toString()
<<ABSTRACT>> <<ABSTRACT>>
SavingAcc CurrentAcc
+boolean isSalary float creditLimit
+void withdraw(float) +void withdraw(float)
+String toString() +String toString()
SavingAcc getNewSavingAccount()
+void withdraw(float) +void withdraw(float)
CurrentAcc getNewCurrentAccount()
+String toString() +String toString()
Page 2 of 3
isSalaried private boolean Read Only
MINBAL private float Read Only static final
Page 3 of 3
6. Concrete MMCurrentAcc: A concrete class representing bank specific Current
Account. It extends CurrentAcc.
Constructors Access Parameters Particulars
public AccNo, accNm, accBal, Lazy initialization
creditLimit for creditLimit.
8. The Entry point for application part: Design an entry point for the application to
test working of a framework.
a. Assign instance of MMBankFactory to BankFactory reference.
b. Instantiate MMSavingAcc and refer it through reference SavingAcc.
c. Instantiate MMCurrentAcc and refer it through reference CurrentAcc.
d. Invoke withdraw() method.
e. Invoke toString() method.
Question 02
SmartBuy is a leading mobile shop in the town. After buying a product, the customer
needs to provide a few personal details for the invoice to be generated.
You being their software consultant have been approached to develop software to retrieve
the personal details of the customers, which will help them to generate the invoice faster.
Component Specification: Customer
Type (class) Attribute method Responsibilities
Customer String customerName Include the
getters and
setters methods
for all attributes
long contactNumber
String emailId
Int age
Page 4 of 3
Get the details as shown in the sample input and assign the value for its attributes using
the setters.
Display the details as shown in the sample output using the getters method. All classes
and methods should be public, Attributes should be private.
Note:
In the Sample Input / Output provided, the highlighted text in bold corresponds to the
input given by the user and the rest of the text represents the output.
Ensure to follow the object oriented specifications provided in the question.
Ensure to provide the names for classes, attributes and methods as specified in the
question. Adhere to the code template, if provided.
Sample Input 1:
Enter the Name:
john
Enter the ContactNumber:
9874561230
Enter the EmailId:
[email protected]
Enter the Age:
32
Sample Output 1:
Name: john
ContactNumber:9874561230
EmailId:[email protected]
Age:32
Good Luck
Page 5 of 3