0% found this document useful (0 votes)
1 views6 pages

Java Lab Paper

The document outlines a series of programming tasks in Java, including applet programs, arithmetic operations, multi-threading applications, and simulations of various scenarios such as traffic lights and animals. Each task specifies the requirements for creating different Java programs, focusing on concepts like exception handling, inheritance, and user interfaces. The tasks range from simple drawing applications to more complex implementations involving mathematical calculations and object-oriented programming principles.

Uploaded by

karuna.4796
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)
1 views6 pages

Java Lab Paper

The document outlines a series of programming tasks in Java, including applet programs, arithmetic operations, multi-threading applications, and simulations of various scenarios such as traffic lights and animals. Each task specifies the requirements for creating different Java programs, focusing on concepts like exception handling, inheritance, and user interfaces. The tasks range from simple drawing applications to more complex implementations involving mathematical calculations and object-oriented programming principles.

Uploaded by

karuna.4796
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/ 6

1. Write an Applet Program to draw a car.

2. WAJP to perform arithmetic operations using Exceptional Handling (in Switch Case).

3. Develop an applet that receives an integer in one text field, and computes its factorial Value
and returns it in another text field, when the button named “Compute” is clicked.

4. Write a Java program that implements a multi-thread application that has three threads.
First thread generates random integer every 1 second and if the value is even, second
thread computes the square of the number and prints. If the value is odd, the third thread
will print the value of cube of the number.

5. WAJP to perform arithmetic operations using Packages.

6. WAJP to perform Multiple Inheritance using Packages.

7. Write a Java program that simulates a traffic light. The program lets the user select one of
three lights: red, yellow, or green with radio buttons. On selecting a button, an appropriate
message with “Stop” or “Ready” or “Go” should appear above the buttons in selected color.
Initially there is no message shown.

8. Write a Java program that simulates a Animals . The program lets the user select one of
three branches: G,D & C with radio buttons. On selecting a button, an appropriate message
with “GOAT” or “DOG” or “CAT” should appear above the buttons in selected color. Initially
there is no message shown.

9. Write a java program to create an abstract class named Shape that contains two integers
and an empty method named printArea(). Provide three classes named Rectangle, Triangle
and Circle such that each one of the classes extends the class Shape. Each one of the classes
contains only the method printArea() that prints the area of the given shape.
10. Write a java program that implements educational hierarchy using inheritance.

11. Write a program to explain the multithreading of multiplication table generation for 3, 5, 13.

12. Write a program to create a window with two buttons called Father and Mother
respectively. When the user clicks Father button, the name , age, qualification and
designation of your Father must appear. If the user clicks the mother button the details of
your mother must be displayed.

13. Write a Java program to create a window as shown below by using AWT:

Birds

● Cuckoo Dove
● Hen Love Birds
● Crow Eagle
● Peacock Vulture

14. Write a Applet Program to display the house.


15. WAJP that prints all real solutions to the quadratic equation aX2 + bX+ c=0. Read in a, b, c
and use the quadratic formula. If the discriminant b2– 4ac is negative, display a message
stating that there are no real solutions (Using Exceptional Handling).
16. Write a Java program that reads a line of integers separated by commas and then displays
each integer and find the sum of the integers.

17. Write a Java program that simulates Cricketers . The program lets the user select one of
three country : “INIDA ” ,”Australia ” & “ England” with radio buttons. On selecting a button,
an appropriate message with “ Dhoni“ or ”Michael Craclke ” or “Cook” should appear above
the buttons in selected color. Initially there is no message shown.

18. Write a java program to find the details of the students eligible to enroll for the examination
( Students, Department combinedly give the eligibility criteria for the enrollment class)
using interfaces

19. Write an applet to perform the 4 basic arithmetic operations as buttons in a form accepting
two integers in textboxes and display their result.

20. Write a Java Program to define a class, define instance methods for setting and retrieving
values of instance variables and instantiate its object. (take minimum 3 parameters)

21. (a) WAJP to print the marksheet of a student (Take Minimum Six Subjects)
(b) Write a program to implement the concept of Exception Handling by creating user
defined exceptions.
22. WAJP to perform arithmetic operations using static members.

23. Write a program to use applet function to draw a shape of the house.

24. Write a Java program that implements a multi -


thread application that has three threads. First
thread generates random integer every 10 second
and if the value is odd, second thread computes
the factorial of the number and prints. If the value is even, the third thread will print the
value of square of the number.

25. Write a java program for abstract class to find areas of different shapes.

26. Five Bikers Compete in a race such that they drive at a constant speed which may or may
not be the same as the other. To qualify the race, the speed of a racer must be more than the
average speed of all 5 racers. Take as input the speed of each racer and print back the speed
of qualifying racers.

27. Write an Applet Program to Draw HOME.

28. Write a Java program that simulates a Animals. The program lets the user select one of three
branches: G,D & C with radio buttons. On selecting a button, an appropriate message with
“GOAT” or “DOG” or “CAT” should appear above the buttons in selected color. Initially there
is no message shown.
29. Write an Applet or AWT Program to Draw the Traffic Signal

30. Write a Java program that simulates a Operating Systems. The program lets the user select
one of three branches: Windows, Andriod, IOS with radio buttons. On selecting a button, an
appropriate message with “Nokia Lumina” or “Samsung” or “iPhone” should appear above
the buttons in selected color.

31. Write an Applet Program to Draw Indian Flag.

32. Write an Applet Program to draw the below shape

33. Write an Applet Program to Draw Smiley.

34. Write an Applet Program to display as Below:


35. WAJP to Perform String Tokenizer.

36. Write java program to create a super class called Figure that receives the dimensions of two
dimensional objects. It also defines a method called area that computes the area of an
object. The program derives two subclasses from Figure. The first is Rectangle and second is
Triangle. Each of the sub class overridden area () so that it returns the area of a rectangle
and a triangle respectively.

37. Write a java program to calculate Gross Salary (Without Tax) & Net Salary (Tax
Include) taking the following data. Input: empno, empname, basic
Process:
DA=138%of basic
HRA=55%of basic
CCA=Rs 2240/- (City Compensatory Allowance)
PF=15%of basic
PT=Rs 300/ (Professional Tax)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy