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

JAVA4 Edited

Java edition

Uploaded by

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

JAVA4 Edited

Java edition

Uploaded by

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

1.

Write a program using Swing to accept values in two textboxes and display the results
of mathematical operations in the third text box. Use four buttons add, subtract,
multiply, and divide.

2. Write a multithreaded program to print odd numbers and even numbers from two
different threads with suitable delay.

1. Write a swing program to accept an integer in a textbox then reverse that number and
display the result in the second textbox.

2. Create an interface Department containing attributes deptName and deptHead. It has an


abstract method showData() for printing the attributes. Create a class Hostel containing
hostelname, hostellocation and noofrooms and also have methods readData() and
printData() for reading and printing the details. Then write another class named Student
extending the Hostel class and implementing the Department interface. This class
which contains the attributes studname, regno, electivesub and avgmark. Use getData()
and displayData() for reading and printing the details.
1. Write an applet program to load an image and display it.

2. Write a Java program to read n numbers and race an exception called


NegativeException when you input a negative number.

1. Write a swing program to accept an integer in a textbox then find the factorial of that
number and display the result in the second textbox.

2. Write a Java program that implements educational hierarchy using inheritance.

Office
empno:
empname:
salary:
getvalue()

Teaching NonTeaching

Designation Designation
setvalue() setvalue()
1. Write an applet program to display National flag.

2. Write a package to perform the mathematical operations - Addition, Subtraction,


Multiplication, Division, and Modulus. Write a menu-driven program for all these
operations and import the package for the above-said operations.

You might also like