0% found this document useful (0 votes)
9 views4 pages

LAB Questions

The document outlines four chapters detailing Java programming projects. Chapter 1 focuses on a basic banking system with account management features, Chapter 2 describes a university management system using abstract classes, Chapter 3 presents a job application system with custom exception handling, and Chapter 4 involves managing a deck of playing cards using the Collection interface.

Uploaded by

bossjojo915
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)
9 views4 pages

LAB Questions

The document outlines four chapters detailing Java programming projects. Chapter 1 focuses on a basic banking system with account management features, Chapter 2 describes a university management system using abstract classes, Chapter 3 presents a job application system with custom exception handling, and Chapter 4 involves managing a deck of playing cards using the Collection interface.

Uploaded by

bossjojo915
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/ 4

Chapter 1 :

Problem Statement:
Create a Java program to implement a basic banking system with the
following features:

 Account creation (Name, Account Number, Initial Balance).


 Deposit and withdrawal operations.
 Prevent overdraft by checking the balance before withdrawal.
 Display account details after each operation.

Input Example:

Copy
Create Account:
Name: Alice Smith
Account Number: 67890
Initial Balance: 2000

Deposit: 1000
Withdraw: 2500

Output Example:

Copy
Account Created Successfully!
Name: Alice Smith
Account Number: 67890
Initial Balance: 2000

Deposit successful! Current Balance: 3000

Error: Insufficient funds. Current Balance: 3000

Chapter 2 :
Problem Statement:
Design a university management system using Java with the following
features:

 Use an abstract class Person with attributes name, age, and methods
like displayDetails().
 Create derived classes Student and Professor to
override displayDetails() and add unique attributes like studentId for
students and department for professors.
 Add a method to calculate the years of experience for professors based
on their joining year.

Input Example:

Copy
Add Student:
Name: Alice
Age: 20
Student ID: S101

Add Professor:
Name: Dr. Smith
Age: 45
Department: Computer Science
Joining Year: 2005

Output Example:

Copy
Student Details:
Name: Alice
Age: 20
Student ID: S101

Professor Details:
Name: Dr. Smith
Age: 45
Department: Computer Science
Years of Experience: 18

Chapter 3 :
Problem Statement:
Create a Java program for a job application system with custom exception
handling. The program should:

 Allow candidates to apply for jobs.


 Throw a ExperienceNotMetException if the candidate does not meet the
minimum required experience.
 Throw a SkillMismatchException if the candidate does not have the
required skills.
 Display appropriate error messages for each exception.

Input Example:

Copy
Apply for Job: Software Engineer
Required Experience: 3 years
Candidate Experience: 2 years
Required Skills: Java, Python
Candidate Skills: Java, C++

Output Example:

Copy
Error: ExperienceNotMetException - Minimum 3 years of experience required.
Error: SkillMismatchException - Required skills: Java, Python.

Chapter 4 :
Problem Statement:
Create a Java program to manage a deck of playing cards using
the Collection interface. The program should:

 Allow users to add cards to the deck (each card has a symbol and
value).
 Group all cards by their symbol and display them.
 Allow users to search for all cards of a given symbol.

Input Example:

Copy
Add Card:
Symbol: Hearts
Value: Ace

Add Card:
Symbol: Hearts
Value: King

Add Card:
Symbol: Spades
Value: Queen

Search Cards:
Symbol: Hearts

Output Example:

Copy
Cards in Deck:
Hearts: [Ace, King]
Spades: [Queen]

Cards Found for Symbol 'Hearts': [Ace, King]

You might also like