AJP LAB
1. Design a system for Fun Park. The system keeps track of the number of people who
visited the park, and the total ticket amount collected. People passing by have to pay
Rs. 50 (including 10% tax). Create a class named "FunPark" with the following
members.
a. Data members (Number of people, total amount collected without tax, total
tax amount collected) Member functions (Increment number of people and
amount, save record in file, display the result (total tickets sold, total amount
collected with/without tax, total tax amount))
b. Exception: Number of people must be a valid integer.
Use appropriate constructors, concept of interfaces, virtual method, File I/O
2. Write a Java program that demonstrates multithreading concepts by creating three
threads:
a. Thread 1: Prints numbers 1 to 5 with a 500ms delay.
b. Thread 2: Prints "Hello" five times with a 300ms delay.
c. Thread 3: Prints "Java" five times with a 700ms delay.
Implement the following:
d. Thread Properties: Assign different priority levels to each thread.
e. Thread Synchronization: Use a shared counter accessed by all threads,
ensuring synchronization to avoid race conditions.
3. Write a program to read an input string from the user and write the vowels of that
string in VOWEL.TXT and consonants in CONSOLNANT.TXT.
4. Write a Java Swing program to create a registration form with the following fields:
a. Name, Email, and Password (Text fields)
b. Gender (Radio buttons: Male, Female, Other)
c. Hobbies (Checkboxes: Reading, Traveling, Sports, Music)
d. Country (Dropdown)
e. Age (Slider: 18-100)
f. Submit Button: On click, display the entered data in a new window. Include
input validation for required fields (Name, Email, Password, Gender). Show an
error message if any required fields are missing.
5. Write a Java Swing program that demonstrates the following events:
a. Key Event: Display typed characters in a status label.
b. Focus Event: Show messages when a text field gains or loses focus.
c. Mouse Event: Show a message when the mouse enters or leaves a panel.
6. Develop a java swing program to implement CRUD operation for student information
management using JDBC and oracle database.
7. Write a Java program that demonstrates cursor movement methods in scrollable
result sets using JDBC. Include transaction management to handle database
operations effectively.
8. Write a Java program consisting of two separate applications that communicate with
each other over a network using TCP sockets.
9. Create a Java program using the JavaMail API to send an email, allowing user input for
the recipient, subject, and message. Include SMTP configuration and error handling for
the email-sending process.
10. Write a JavaFX program that incorporates Swing components to calculate simple
interest. Use text fields for user input (principal, rate, time) and display the result in
another text field when the user clicks a button.
11. Write a simple Java servlet program that displays a login form with username and
password fields. If the user provides incorrect credentials, display an error message. If
the username and password are correct, redirect the user to a welcome page that
includes a logout option.
12. Create a JSP program for student information management with full CRUD
functionality (Create, Read, Update, Delete). The program should interact with a
database to manage student records.
13. Create an RMI application such that a client sends an Integer number to the server and
the server return the factorial value of that integer. Give a clear specification for every
step.