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

Comprehensive Practice Questions Guide

The document provides a comprehensive list of practice questions organized by unit and template for programming concepts, covering topics such as vectors, arrays, file handling, interfaces, inheritance, exceptions, threading, GUI, networking, and JDBC. Each unit includes a specific number of high-quality, exam-focused questions designed to enhance application-level understanding. The document emphasizes a structured approach to practice with over 120 questions tailored to replicate exam patterns.

Uploaded by

ruturajx2634
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 views8 pages

Comprehensive Practice Questions Guide

The document provides a comprehensive list of practice questions organized by unit and template for programming concepts, covering topics such as vectors, arrays, file handling, interfaces, inheritance, exceptions, threading, GUI, networking, and JDBC. Each unit includes a specific number of high-quality, exam-focused questions designed to enhance application-level understanding. The document emphasizes a structured approach to practice with over 120 questions tailored to replicate exam patterns.

Uploaded by

ruturajx2634
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

Bilkul Rutu bhai!

Ab main tumhe practice questions template-wise + unit-wise de raha hoon — matlab jis
structure ka template maine upar diya hai, uske liye exact practice questions milega.

This means:

✔ Har UNIT ke liye

✔ Har TEMPLATE ke liye

✔ 6–10 high-quality exam-focused practice questions

Aise practice questions ki list tumhare paas hogi jo exam ke 90% application programs ko
cover kar degi.

Let’s begin 🔥🔥

⭐ UNIT 1 — (Vector / Array / Wrapper / File


Handling)
Template: VectorApp Template

✔ Practice Questions (10 questions)

1. Create a Vector of 10 integers, remove all even numbers, display result.


2. Create a Vector of names, insert a name at position 2 and remove last element.
3. Add 5 integers and 2 strings to a Vector and display capacity after each addition.
4. Create a Vector and replace every String element with uppercase version.
5. Store 5 Float values in Vector, compute average.
6. Accept 5 inputs from user and add to Vector, then remove element at index 3.
7. Create Vector of mixed data types and count how many values are numeric.
8. Add city names, sort alphabetically without using [Link]().
9. Copy all elements of Vector A to Vector B manually.
10. Merge two vectors (A + B) into a single Vector C.

Template: ArrayList / Array Template

✔ Practice Questions (5 questions)


1. Read 10 integers, remove duplicate elements and print unique list.
2. Read an array of integers and reverse it.
3. Count frequency of every number in an array.
4. Remove all negative numbers from an ArrayList.
5. Split a String into words and store words into ArrayList.

Template: File Handling Template

✔ Practice Questions (5 questions)

1. Read numbers from file "[Link]" and print sum.


2. Count how many lines exist in a text file.
3. Read file content and convert everything to uppercase.
4. Copy content of one file to another file.
5. Read names from a file and store in Vector.

⭐ UNIT 2 — (Interface + Classes +


Inheritance Templates)
Template: Interface + Student + Result Template

✔ Practice Questions (10 questions)

1. Interface Sports (wt=10), class Student & class Result → calculate final score.
2. Create interface Shape with area(); implement Circle, Square.
3. Create interface Bank with rate(). Implement SBI & HDFC, show interest on amount.
4. Interface Vehicle with speedUp(); class Bike and Car override method.
5. Interface Payable with getSalary(); implement Employee and Manager.
6. Interface Printable; classes Report & Invoice implement print().
7. Abstract class Account; subclass Savings & Current → show balance after operations.
8. Class Employee with Permanent & Contract subclasses → calculate monthly salary.
9. Create abstract class Student → subclass InternalStudent and ExternalStudent.
10. Package “media” containing class Song → import and display song info.

Template: Inheritance + Class Design Template


✔ Practice Questions (5 questions)

1. Base class Person → subclass Employee → subclass Manager: display details.


2. Create class Calculator with overloaded add() methods.
3. Class Product → subclass Electronics → calculate discount.
4. Class Student with constructor overloading (two versions).
5. Class Book with method overriding in Ebook.

⭐ UNIT 3 — (Exception + Thread Templates)


Template: Custom Exception Template

✔ Practice Questions (10 questions)

1. Throw exception if mark entered < 0 or > 100.


2. Throw exception if password length < 6.
3. Throw exception if age < 18 for driving license.
4. Throw exception if withdrawal amount > balance.
5. Throw exception if array index accessed is invalid.
6. Throw exception if user enters string instead of number.
7. Throw exception if file name doesn’t exist.
8. Throw exception for division by zero.
9. Throw exception if username contains space.
10. Throw exception if negative number entered for factorial.

Template: Thread Program Template

✔ Practice Questions (10 questions)

1. Thread A prints even numbers, Thread B prints odd numbers.


2. Thread prints Fibonacci series up to 20 terms.
3. Thread prints multiplication table of a number.
4. Two threads print alphabets A–Z and a–z simultaneously.
5. Thread prints numbers 1 to 100 with 1 sec delay.
6. Two threads print names “Rutu” and “ChatGPT” alternately.
7. Create thread for counting vowels in string.
8. Thread that prints prime numbers between 1–100.
9. Thread that stops automatically after 5 seconds.
10. Thread that prints reverse of given string.
Template: Synchronization Template

✔ Practice Questions (5 questions)

1. Producer–Consumer using wait/notify.


2. Bank account balance shared between two threads.
3. Ticket booking system preventing overbooking.
4. Two threads adding +1 to shared counter (with synchronization).
5. Library system where only one user can issue book at a time.

⭐ UNIT 4 — (Swing Templates)


Template: Add Number GUI Template

✔ Practice Questions (10 questions)

1. Create GUI to add/subtract/multiply/divide two numbers.


2. Create GUI to calculate simple interest.
3. Create GUI to calculate area of circle.
4. GUI to check whether number is EVEN or ODD.
5. GUI to convert Celsius → Fahrenheit.
6. GUI to check palindrome string.
7. GUI to count characters of a string.
8. GUI to reverse a string.
9. GUI to display square & cube of a number.
10. GUI to compare two strings.

Template: Login GUI Template

✔ Practice Questions (5 questions)

1. Create login screen (username/password) and validate hardcoded credentials.


2. Login GUI that checks minimum length.
3. GUI that counts how many times login button is clicked.
4. GUI that allows only 3 login attempts.
5. GUI that masks password (JPasswordField use).
Template: JComboBox Template

✔ Practice Questions (5 questions)

1. Display state names and show selected state in text field.


2. Display fruits list → show price when selected.
3. Display semesters → show total subjects when selected.
4. Display colors → change panel background color.
5. Display programming languages → show description.

Template: KeyListener Template

✔ Practice Questions (5 questions)

1. Display typed character on label.


2. Count characters typed live.
3. Show ASCII value of last key.
4. Block numeric input from being typed.
5. Track Arrow key movements.

Template: JTree Template

✔ Practice Questions (5 questions)

1. Display folder structure of local drive.


2. Create tree of categories → subcategories.
3. Display organization hierarchy (CEO → managers → employees).
4. Display food menu tree.
5. Display book categories with chapters.

⭐ UNIT 5 — (Networking Templates)


Template: URL Reading Template

✔ Practice Questions (5 questions)

1. Read content of any URL given by user.


2. Count lines in downloaded HTML page.
3. Display first 100 characters of webpage.
4. Read webpage and count how many <a> tags exist.
5. Replace all HTML tags with blank spaces.

Template: TCP Client–Server Template

✔ Practice Questions (10 questions)

1. Check even/odd number using server.


2. Check prime number using server.
3. Send string → server returns uppercase.
4. Send two numbers → server returns sum.
5. Send name → server returns length.
6. Send string → server counts vowels.
7. Send sentence → server returns word count.
8. Send year → server checks leap year.
9. Send username → server validates pattern.
10. Send number → server returns multiplication table.

Template: UDP Template

✔ Practice Questions (3 questions)

1. UDP → send message and receive reversed string.


2. UDP → send number and get its square.
3. UDP → send a character and get ASCII value.

⭐ UNIT 6 — (JDBC Templates)


Template: JDBC Select Query Template

✔ Practice Questions (10 questions)

1. Display employees of dept=10.


2. Display employees with salary > 30000.
3. Display student details whose marks > 80.
4. Display all records sorted by name.
5. Display products with price between given range.
6. Display student with highest marks.
7. Display all employees and their total salary = salary + bonus.
8. Display all customers who live in “Pune”.
9. Display all books written by given author.
10. Display result of JOIN between two tables.

Template: Insert / Update / Delete Template

✔ Practice Questions (5 questions)

1. Insert new employee record.


2. Update salary of specific employee.
3. Delete student with given roll no.
4. Insert 5 records using batch.
5. Implement transaction: transfer money between accounts.

🐆 Rutu, this is your ULTIMATE practice


bank!
With these:

✔ 120+ practice questions

✔ 100% template-based

✔ Exam pattern replicated

✔ Logic-only writing required

Tumhara application-level section DESTROY mode me chala jayega.

Want next power-up?


I can create:

🔥 “Top 25 Must-Write Application Programs” PDF


🔥 OR each template ka full code + explanation booklet

Bol bhai, kya chahiye?

You might also like