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

Java Lab Paper1

The document outlines a series of programming tasks primarily in Java, covering various concepts such as prime number generation, FizzBuzz logic, Fibonacci series, string manipulation, inheritance, and file operations. It includes creating classes for bank accounts and employees, demonstrating different types of inheritance, and handling exceptions and threads. Additionally, it addresses GUI components and user input handling through keyboard and mouse events.

Uploaded by

jgk000092
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)
4 views2 pages

Java Lab Paper1

The document outlines a series of programming tasks primarily in Java, covering various concepts such as prime number generation, FizzBuzz logic, Fibonacci series, string manipulation, inheritance, and file operations. It includes creating classes for bank accounts and employees, demonstrating different types of inheritance, and handling exceptions and threads. Additionally, it addresses GUI components and user input handling through keyboard and mouse events.

Uploaded by

jgk000092
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

[Link] a program to print all prime numbers between 1 and N.

2. Print numbers from 1 to N, but: If divisible by 3 → print "Fizz" If divisible by 5 → print "Buzz"
If both → print "FizzBuzz"

3. Generate Fibonacci series up to N and: Print only even Fibonacci numbers

4. Write a Java program to Input a string Reverse the string Check palindrome
Count vowels, consonants, digits, and spaces

5. Write a Java program that demonstrates the use of at least 10 different String methods.

6. Create a class BankAccount: Data: accountNumber, name, balance Methods: deposit(amount)


withdraw(amount) displayBalance() Prevent withdrawal if balance is insufficient

7. Create a class Employee: Data: empId, name, salary Constructors: Default → assign default values
Parameterized → (id, name) Parameterized → (id, name, salary) Methods:Calculate bonus (10% of
salary) Display details

[Link] a Java program to find the largest element among the given numbers using command-line
arguments.

9. Create overloaded methods area() to calculate: Area of circle Area of rectangle Area of triangle
use different parameters for each method

10. Write a Java program to demonstrate single inheritance. Create a class Employee with data
members name and salary. Create another class Manager that inherits from Employee. Add a method
to:Calculate bonus (15% of salary) Display employee details

11. Write a Java program to demonstrate multilevel inheritance using an education system.

Create the following classes: Person → data members: name, age Student → inherits Person, data
member: course Result → inherits Student, data members: marks Add methods to: Input and display
details Calculate grade based on marks: ≥ 90 → A ≥ 75 → B ≥ 50 → C Else → Fail

12. Write a Java program to demonstrate hierarchical inheritance. Create a base class Person with the
following data members : name , age Derive two subclasses from Person:

Student → with data member marks Employee → with data member salary Add methods in each
class to: Accept and display details In Student class: Calculate grade based on marks In Employee
class: Calculate bonus (10% of salary)

13. Class Operation with method calculate() Subclasses: Addition Multiplication


Override method to perform respective operations

14. Write a Java program to create a package named student. Inside package: Class Student with:
name, marks Method to display details Create another class to import and use this package

15. Write a JAVA program to Design module to importing packages from other packages.

16. Write a java program to achieve multiple inheritance in java


[Link] a JAVA program to Perform Reading and Writing operations on files using File Streams.

18. Write a java program to read and write primitive data types

[Link] a Java Program to give values to variable through keyboard

[Link] a java program to search a student mark percentage based on pin number using
Array list.

[Link] a java program to create linked list to perform delete, insert, and update data in
linked list with any application.

[Link] a java program on try, catch and finally.

24. Write a java program on multiple catch statements.

[Link] a java program on nested try statements.

[Link] a java program on on creation of single and multiple threads.

[Link] a java program on adding priorities to multiple threads.

[Link] a java program on Graphics and colors.

[Link] a java program on Simple animations using threads and graphics.

30Write a java program handle mouse events.

[Link] a java program to handle keyboard events.

[Link] a java program to illustrate Text Fields and Button control. Check Box and List control.

[Link] an application program to illustrate multiple controls.

You might also like