Assignment 1
Assignment 1
S. No. Question CO BT
Level
1(a) Explain the buzzwords of Java in detail. CO1 L2
(b) Develop a Java application to generate Electricity bill. Create a class with the CO1 L3
following members: Consumer no, consumer name, previous month reading,
current month reading, type of EB connection (i.e domestic or commercial).
Compute the bill amount using the following tariff.
If the type of the EB connection is domestic, calculate the amount to be
paid as follows:
First 100 units - Rs. 2 per unit
101-200 units - Rs. 3.50 per unit
201 -500 units - Rs. 5 per unit
Above 501 units - Rs. 6 per unit
If the type of the EB connection is commercial, calculate the amount to be
paid as follows:
First 100 units - Rs. 4 per unit
101-200 units - Rs. 6 per unit
201 -500 units - Rs.7 per unit & > 501 units - Rs. 10 per unit
2 Develop a Java application for banking system. The class Bank has three instance CO1 L3
variables customer_id, account_no,balance and one static variable cust_count. It
has methods
(i) withdraw(double amount), which deducts the amount from balance
(ii) deposit(double amount) which adds the amount to the balance
(iii) display() which displays the account balance and
(iv) static method getCount() which displays the number of customers
done transactions.
Create any number of objects(customers) for Bank class, do transactions deposit
and withdraw and finally display the balance of each customer and number of
customers done the transactions.
3(a) Is multiple inheritance achieved in Java? Justify your answer CO4 L4
(b) Explain how polymorphism is achieved in Java with suitable examples. CO4 L2
4(a) Explain different access modifiers used in java with examples CO4 L1
5 CO1 L3
Design and implement a Tambola (Housie) game in Java. The program should
simulate a real-world Tambola game where a caller announces numbers, and
players mark them on their tickets until a winning pattern is achieved.
Requirements:
2. Fields:
(d)winner
3.Functionalities to Implement:
(a)Generate a Tambola Ticket for each player - A 3x3 grid with random
numbers arranged as per Tambola rules.
(e)Winning Conditions
(i)Top Line – First player to mark all numbers in the top row.
(ii)Middle Line – First player to mark all numbers in the middle row.
(iii)Bottom Line – First player to mark all numbers in the bottom row.