CBSE Class 12 Informatics Practices Revision Assignment Set 01

School Assignments for Class 12 Informatics Practices: All topics

Explore structured practice materials through the CBSE Class 12 Informatics Practices Revision Assignment Set 01. Tailored for Class 12 learners, utilizing these Informatics Practices assignments ensures thorough preparation and strengthens foundational knowledge before final CBSE evaluations.

Practice Class 12 Informatics Practices Assignments: All topics

View or download the dedicated CBSE Class 12 Informatics Practices Revision Assignment Set 01 resource below. Engaging with these assignments under focused study conditions ensures continuous academic progress and mastery of the 2026-27 curriculum.

Question 1. Differentiate between: a. JTextField and JPasswordField b. JButton and JFrame c. JCheckBox and JRadioButton d. JComboBox and JListBox e. JTextField and JTextArea f. JLabel and JTextField
Answer: a. JTextField: A single-line text component that allows the user to type and edit normal text.
JPasswordField: A single-line text component specialized for entering passwords, where typed characters are masked using echo characters (like *).

b. JButton: A component that produces an action event when clicked by the user (push button).
JFrame: A top-level container window that provides a window frame with title, border, and minimize/maximize/close buttons.

c. JCheckBox: A box that can be selected or deselected independently, allowing multiple selections from a group.
JRadioButton: One of a group of buttons where only one button can be selected at a time within that button group.

d. JComboBox: A component that combines a button or editable field and a drop-down list, saving screen space.
JListBox: A component that displays a static list of choices from which the user can select one or more items in a scrolling box.

e. JTextField: Allows input and editing of text strictly in a single line.
JTextArea: Allows input and editing of text across multiple lines and rows.

f. JLabel: A display area for a short string of text, an image, or both; it is non-editable by the user.
JTextField: An interactive component that allows the user to input and modify text values.
In simple words: These Java Swing components serve distinct UI purposes for data entry, selection, and display.

Exam Tip: Memorize the key distinction between single-line vs multi-line, and single-selection vs multiple-selection components.

 

Question 2. Explain the use of following functions of Java: a. Integer.parseInt() b. Integer.toString() c. Math.round() d. Math.pow() e. length() f. Byte.parseByte() g. substring() h. concat() i. toLowerCase() j. JOptionPane.showMessageDialog() k. next() l. DriverManager.getConnection()
Answer: a. Integer.parseInt(): Parses a string argument as a signed decimal integer.
b. Integer.toString(): Returns a String object representing the specified integer.
c. Math.round(): Returns the closest long or int to the argument, rounding ties upward.
d. Math.pow(): Returns the value of the first argument raised to the power of the second argument.
e. length(): Returns the length (number of characters) of a string or array.
f. Byte.parseByte(): Parses the string argument as a signed decimal byte.
g. substring(): Returns a new string that is a substring of the given string.
h. concat(): Concatenates the specified string to the end of another string.
i. toLowerCase(): Converts all of the characters in a string to lower case using default locale rules.
j. JOptionPane.showMessageDialog(): Pops up an informative message dialog box.
k. next(): Reads the next token from the scanner as a string.
l. DriverManager.getConnection(): Attempts to establish a connection to the given database URL.
In simple words: These standard library methods perform type conversions, mathematical calculations, string manipulations, and database connectivity.

Exam Tip: Be sure to write the class name correctly for static methods like Integer.parseInt() and Math.pow().

 

Question 3. Write any two common properties and two common methods among following: a. JTextField and JTextArea b. JCheckBox and JRadioButton c. JComboBox and JListBox
Answer: a. JTextField and JTextArea:
- Common Properties: text, editable
- Common Methods: getText(), setText()

b. JCheckBox and JRadioButton:
- Common Properties: text, selected
- Common Methods: isSelected(), setSelected(boolean b)

c. JComboBox and JListBox:
- Common Properties: model, selectedIndex
- Common Methods: getSelectedIndex(), getSelectedItem()
In simple words: Components in the same category share common property attributes and getter/setter methods.

Exam Tip: Property names in Swing usually correspond to getter and setter method names (e.g., text corresponds to getText() and setText()).

 

Question 4. Write Java function named tenfolds() that takes a number as parameter and returns its tenth part.
Answer: double tenfolds(double num) {
    return num / 10.0;
}
In simple words: The function takes a number, divides it by 10, and returns the result.

Exam Tip: Always declare the correct return type and parameter type when defining custom Java functions.

 

Question 5. Write statements to import packages for following: a. for database connectivity through JDBC. b. to use JOptionPane dialog box.
Answer: a. import java.sql.*;
b. import javax.swing.JOptionPane;
In simple words: Import statements make external Java classes and packages available in your code.

Exam Tip: Remember that java.sql is used for database connectivity and javax.swing is used for GUI dialog boxes.

 

Question 6. Consider the following GUI: [Virus S/w Hut form with customer name, bill amount, payment mode options, discount, and net amount]
If bill amount is greater than 10000 then discount is calculated as follows:
Cost: 15%, Credit Card: N/L (No Discount), Cheque: 10%
i. Write code to make txtNameofCustomer and txtBillAmount uneditable.
ii. Write code for stop button to close the application.
iii. Write code for Calculate Discount button to calculate discount and net amount.
Answer:
i.
txtNameofCustomer.setEditable(false);
txtBillAmount.setEditable(false);

ii.
System.exit(0);

iii.
double bill = Double.parseDouble(txtBillAmount.getText());
double disc = 0.0, net = 0.0;
if (bill > 10000) {
    if (jRadioButton1.isSelected()) {
        disc = bill * 0.15;
    } else if (jRadioButton2.isSelected()) {
        disc = 0.0;
    } else if (jRadioButton3.isSelected()) {
        disc = bill * 0.10;
    }
}
net = bill - disc;
txtDiscount.setText("" + disc);
txtNetAmt.setText("" + net);
In simple words: The code reads the bill amount, checks the selected payment mode and threshold condition, calculates the discount and net amount, and displays them in text fields.

Exam Tip: Always parse text fields using Double.parseDouble() before performing numerical calculations.

 

Question 7. Consider the following tables:
BOOK (EID, EbookName, Author)
COST (Subj ID, EID, Cost)
i. Suggest the suitable primary key and foreign key in COST table.
ii. Write MySQL query to display EbookName, Author, Cost of each book.
iii. Write MySQL query to display the difference of maximum and minimum cost from cost table.
iv. Give the output of select count(*) from book, cost;
v. How many rows and columns will be there in equijoin of above tables?
Answer:
i. Primary Key in COST table: Subj ID (or EID if one-to-one). Foreign Key in COST table: EID.
ii. SELECT EbookName, Author, Cost FROM BOOK B, COST C WHERE B.EID = C.EID;
iii. SELECT MAX(Cost) - MIN(Cost) FROM COST;
iv. Output of select count(*) from book, cost;: 20 (since BOOK has 4 rows and COST has 5 rows, Cartesian product gives \(4 \times 5 = 20\)).
v. Equijoin will have 4 rows (matching EID values across both tables) and 5 columns (\(3 + 3 - 1\) duplicate EID column removed).
In simple words: Relational queries combine tables using foreign keys and perform aggregate calculations.

Exam Tip: Cartesian product (cross join) multiplies the row counts of both tables, whereas an equijoin filters rows based on matching foreign key values.

 

Question 8. Explain the use of pre-increment and post-increment operator with an suitable example.
Answer:
- Pre-increment (++a): Increments the value of the variable by 1 first, and then uses the new value in the expression.
- Post-increment (a++): Uses the current value of the variable in the expression first, and then increments the variable by 1.
Example:
int a = 5;
int b = ++a; // a becomes 6, b becomes 6
int c = a++; // c becomes 6, then a becomes 7
In simple words: Pre-increment changes the value before evaluation, while post-increment changes it after evaluation.

Exam Tip: Trace increment operators carefully step by step when evaluating assignment expressions in exam questions.

 

Question 9. What is the output produced by following code fragment?
float x=9, y=5;
int z=int(x/y);
switch(z)
{ case 1: x+=2;
case 2: x=x+3;
default: x=x+1;
}
System.out.println("x is: "+x);
Answer:
x is: 15.0
Explanation:
\(x = 9, y = 5\)
\(x / y = 9 / 5 = 1.8\)
\(z = \text{int}(1.8) = 1\)
Since \(z = 1\), execution enters case 1: \(x = 9 + 2 = 11\).
Due to the absence of break statements, execution falls through to case 2: \(x = 11 + 3 = 14\).
It then falls through to default: \(x = 14 + 1 = 15\).
Final output prints 15.0.
In simple words: Switch-case fall-through executes all subsequent cases below the matching case if break statements are omitted.

Exam Tip: Always look out for missing break statements in switch-case questions as they cause fall-through execution.

 

Question 10. Which HTML tags are used for
a. line break b. horizontal rule c. to put a table d. to insert an image e. to change background color
f. to change font size g. to make heading h. to make a textfield i. to make a form
Answer:
a. <br>
b. <hr>
c. <table>
d. <img>
e. <body bgcolor="..."> (or CSS background-color)
f. <font size="..."> (or CSS font-size)
g. <h1> to <h6>
h. <input type="text">
i. <form>
In simple words: HTML utilizes specific tag names to structure web pages, format text, and embed multimedia.

Chapter Assignment & Practice Material for Class 12 Informatics Practices All topics

Class 12 Informatics Practices All topics Printable Assignments

Explore reliable practice questions for All topics tailored for Class 12 learners. Use these structured worksheets to evaluate preparedness and strengthen core problem-solving skills.

Maximize Exam Scores with Chapter Practice Sets

  • Curriculum Standards: Assignments match modern CBSE sample formats to ensure relevant preparation.
  • Thorough Revision: Detailed problem sets reinforce core concepts and eliminate conceptual weak spots.
  • Execution Speed: Timed practice with assignment sets sharpens overall response timing.

Steps to Complete All topics Assignments Successfully

  1. Concept Foundation: Review the NCERT book for Class 12 Informatics Practices thoroughly before diving into assignment tasks.
  2. Self-Evaluation: Solve exercises independently before inspecting professional answer guides.
  3. Progress Monitoring: Note down complex formulas or concepts, clearing them up using available online practice aids.

FAQs

Where can I download the latest CBSE Class 12 Informatics Practices All topics assignments?

You can download free PDF assignments for Class 12 Informatics Practices All topics from StudiesToday.com. These practice sheets have been updated for the 2026-27 session covering all concepts from latest NCERT textbook.

Do these Informatics Practices All topics assignments include solved questions?

Yes, our teachers have given solutions for all questions in the Class 12 Informatics Practices All topics assignments. This will help you to understand step-by-step methodology to get full marks in school tests and exams.

Are the assignments for Class 12 Informatics Practices All topics based on the 2026 exam pattern?

Yes. These assignments are designed as per the latest CBSE syllabus for 2026. We have included huge variety of question formats such as MCQs, Case-study based questions and important diagram-based problems found in All topics.

How can practicing All topics assignments help in Informatics Practices preparation?

Practicing topicw wise assignments will help Class 12 students understand every sub-topic of All topics. Daily practice will improve speed, accuracy and answering competency-based questions.

Can I download Informatics Practices All topics assignments for free on mobile?

Yes, all printable assignments for Class 12 Informatics Practices All topics are available for free download in mobile-friendly PDF format.