0% found this document useful (0 votes)
13 views2 pages

Assignment 1

The document outlines an assignment for the II-B.Tech II-Semester students in the Computer Science and Engineering department at G. Narayanamma Institute of Technology & Science, focusing on Object-Oriented Programming through Java. It includes various tasks such as explaining Java buzzwords, developing applications for electricity billing and banking systems, and designing a Tambola game, with specific requirements and functionalities for each task. The assignment emphasizes different levels of Bloom's taxonomy, ranging from understanding to creating.

Uploaded by

Sandhya Gandham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Assignment 1

The document outlines an assignment for the II-B.Tech II-Semester students in the Computer Science and Engineering department at G. Narayanamma Institute of Technology & Science, focusing on Object-Oriented Programming through Java. It includes various tasks such as explaining Java buzzwords, developing applications for electricity billing and banking systems, and designing a Tambola game, with specific requirements and functionalities for each task. The assignment emphasizes different levels of Bloom's taxonomy, ranging from understanding to creating.

Uploaded by

Sandhya Gandham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

G.

Narayanamma Institute of Technology & Science


(Autonomous) (for Women)
Shaikpet, Hyderabad- 500 104
Department of Computer Science and Engineering

II-B.Tech II-Semester Academic Year 2024-25


Assignment-1
SUBJECT: Object-Oriented Programming through Java
SUBJECT CODE: PC124BK Max Marks: 5M
BRANCH: CSE

Blooms Taxonomy Levels:


Level 1 – Remembering, Level 2 – Understanding, Level 3 – Applying, Level 4 – Analyzing,
Level 5 – Evaluating, Level 6 – Creating
Answer all questions:

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

(b) Explain five keywords of exception handling CO3 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:

1. Class: TambolaGame (Main class to coordinate the game

2. Fields:

(a)Player (Represents a player with a ticket)

(b)Ticket (Represents a player's ticket with randomly generated numbers)

(c)number (random number between 1 and 99)

(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.

(b)Generate Random Numbers-A number should be drawn randomly from 1


to 99 without repetition.

(c)Display Drawn Numbers- Show numbers called one by one in order.

(d)Marking Numbers - If a drawn number is present in a player’s ticket, it


should be marked.

(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.

(iv)Full House – First player to mark all numbers in the ticket.

(f)Announce Winner-Once a winning pattern is achieved, display the winner.

You might also like