30-Mark Practical Lab Mindmap
Class 11 IT Practical Examination • 30 Marks
Problem Solving in Java NetBeans Swing + MySQL Queries + Record + Viva
- Widgets:
JFrame,JLabel,JTextField,JButton,JRadioButton+ButtonGroup,JCheckBox,JList,JOptionPane - Parsing: Always convert strings via
Integer.parseInt()/Double.parseDouble() - Run Key: Press
Shift + F6cleanly during examiner demo
- DDL:
CREATE DATABASE,USE,CREATE TABLEwith constraints,ALTER TABLE,DESC - DML:
INSERT INTO,SELECT,DISTINCT,WHERE,LIKE,IS NULL,UPDATE,ORDER BY
- Must Include: Aim, Controls/Schema Table, Written Code/SQL, Input & Printed Output Screenshot/Table
- Index & Signature: Neat chronological index signed cleanly by subject teacher before external exam
- Hardware/Unicode: Registers (PC/MAR), Cache vs RAM, Odia Unicode
U+0B00–U+0B7F - Java/SQL:
getPassword(),do-whilesemicolon,CHARvsVARCHAR,DELETEvsDROP,NULLrules
How 30 Practical Marks Are Evaluated
8 Ready-to-Run Java Swing Practical Experiments
Rename components meaningfully using right-click → Change Variable Name before coding inside actionPerformed.
Lab 1 & 2: Simple Calculator (+, -, *, /) & Temperature (Celsius ↔ Fahrenheit)
// Lab 1: Arithmetic Calculator (txtA, txtB, txtRes) inside btnAddActionPerformed
double a = Double.parseDouble(txtA.getText());
double b = Double.parseDouble(txtB.getText());
txtRes.setText(Double.toString(a + b)); // repeat with -, *, and (b!=0 ? a/b : "Divide by 0 Error")
// Lab 2: Celsius to Fahrenheit (txtC -> txtF)
double c = Double.parseDouble(txtC.getText());
double f = (c * 9.0 / 5.0) + 32.0;
txtF.setText(String.format("%.2f F", f));
Lab 3 & 4: Student Grade Calculator & JCheckBox Pizza Order Billing
// Lab 3: 3-Subject Result & Grade Popup (JOptionPane + JTextField)
int m1 = Integer.parseInt(txtEng.getText());
int m2 = Integer.parseInt(txtIt.getText());
int m3 = Integer.parseInt(txtMath.getText());
double pct = (m1 + m2 + m3) / 3.0;
String grade = (pct < 50) ? "D" : (pct < 60) ? "C" : (pct < 80) ? "B" : "A";
javax.swing.JOptionPane.showMessageDialog(this, "Total=" + (m1+m2+m3) + " | %=" + pct + " | Grade=" + grade);
// Lab 4: JCheckBox Multi-Select Toppings Calculator
int bill = 150; // Base Pizza
if (chkCheese.isSelected()) bill += 40;
if (chkOlive.isSelected()) bill += 30;
if (chkDrink.isSelected()) bill += 50;
lblTotal.setText("Total Bill: Rs. " + bill);
Lab 5 & 6: JPasswordField Login Check & Factorial / Prime Checker
// Lab 5: Secure JPasswordField Validation
String user = txtUser.getText();
String pass = new String(pwdPass.getPassword()); // NEVER use getText() on JPasswordField!
if (user.equals("chse") && pass.equals("it2026")) {
javax.swing.JOptionPane.showMessageDialog(this, "Login Successful!");
} else {
javax.swing.JOptionPane.showMessageDialog(this, "Invalid Credentials", "Error", javax.swing.JOptionPane.ERROR_MESSAGE);
}
// Lab 6: Factorial of N using for loop
int n = Integer.parseInt(txtNum.getText());
long fact = 1;
for (int i = 1; i <= n; i++) fact *= i;
txtFact.setText(Long.toString(fact));
Labs 7 & 8 (Already Coded in Unit 2): Remember to also practice Electricity Bill (+ Rs. 250 Meter Rent), Cloth Showroom Festival Discount (Mill Cloth vs Handloom), and Teacher ClassName JList / Alignment RadioButton from Unit 2 Section 5.4!
10 Standard CHSE MySQL Practical Commands & Outputs
Complete MySQL Lab Session (Create DB, Constraints, Insert, Query, Update, Sort)
-- 1. Create & open database CREATE DATABASE COLLEGE_IT; USE COLLEGE_IT; -- 2. Create table with PRIMARY KEY, NOT NULL, DEFAULT & CHECK CREATE TABLE STUDENT ( RollNo INT PRIMARY KEY, Name VARCHAR(35) NOT NULL, Stream CHAR(3) DEFAULT 'SCI', Marks DECIMAL(5,2) CHECK (Marks >= 0 AND Marks <= 100), City VARCHAR(25) ); -- 3. Inspect schema & add new column DESC STUDENT; ALTER TABLE STUDENT ADD Email VARCHAR(50); -- 4. Insert sample rows (leave one City empty -> NULL) INSERT INTO STUDENT VALUES (101, 'Ananya Sahoo', 'SCI', 92.50, 'Cuttack', '[email protected]'); INSERT INTO STUDENT (RollNo, Name, Marks) VALUES (102, 'Bikash Das', 78.00); INSERT INTO STUDENT VALUES (103, 'Smita Panda', 'COM', 85.00, 'Puri', NULL); -- 5-10. Lab Queries SELECT * FROM STUDENT WHERE Marks BETWEEN 75 AND 95; SELECT RollNo, Name FROM STUDENT WHERE Name LIKE 'S%'; SELECT RollNo, Name FROM STUDENT WHERE City IS NULL; SELECT DISTINCT Stream FROM STUDENT; UPDATE STUDENT SET Marks = Marks + 2 WHERE RollNo = 102; SELECT RollNo, Name, Marks FROM STUDENT ORDER BY Marks DESC;
Sample Output of Query 10 (ORDER BY Marks DESC after UPDATE): | |||
|---|---|---|---|
| RollNo | Name | Stream | Marks |
| 101 | Ananya Sahoo | SCI | 92.50 |
| 103 | Smita Panda | COM | 85.00 |
| 102 | Bikash Das | SCI (default) | 80.00 (78+2) |
25 Most Asked CHSE Practical Viva Voce Questions
| # | Examiner Question | Crisp 1-Line Winning Answer |
|---|---|---|
| 1 | What is JVM and Bytecode? | javac compiles source into platform-independent .class Bytecode; JVM interprets/runs it on any OS (WORA). |
| 2 | Shortcut to run a Swing form in NetBeans? | Shift + F6 runs the active file; F6 runs the main project. |
| 3 | AWT vs Swing? | AWT uses OS-dependent heavyweight peers; Swing (javax.swing) is lightweight Java with Pluggable Look & Feel. |
| 4 | What are Guarded Blocks? | Read-only grey code generated by NetBeans inside initComponents() editable only via Properties/Design view. |
| 5 | Which window displays component hierarchy? | The Inspector window (including non-visual objects like ButtonGroup). |
| 6 | What does jPasswordField1.getPassword() return? | A character array (char[]), safer than String getText(). |
| 7 | JCheckBox vs JRadioButton? | CheckBox allows multi-selection; RadioButton inside a ButtonGroup allows only one option. |
| 8 | Why use Integer.parseInt()? | jTextField.getText() returns a String; parseInt() converts it to int for math. |
| 9 | Return codes of JOptionPane.showConfirmDialog? | 0 = Yes/OK, 1 = No, 2 = Cancel, -1 = Closed via X. |
| 10 | Entry-controlled vs Exit-controlled loop? | for/while check condition first (min 0 runs); do-while runs body once first (min 1 run, ends with ;). |
| 11 | Syntax error vs Logical error? | Syntax error fails compilation (caught by javac); Logical error runs fine but prints wrong math/output. |
| 12 | What are Tuple, Attribute, Degree, Cardinality? | Row, Column, Column count, and Row count of a relational table. |
| 13 | Primary Key vs Foreign Key? | Primary Key uniquely identifies each row (NOT NULL + UNIQUE); Foreign Key references another table's PK. |
| 14 | Difference between CHAR(10) and VARCHAR(10)? | CHAR allocates fixed padded 10 bytes (max 255); VARCHAR stores exact length + length bytes (max 65,535). |
| 15 | DDL vs DML commands with examples? | DDL defines structure (CREATE, ALTER, DROP); DML manipulates rows (SELECT, INSERT, UPDATE, DELETE). |
| 16 | DELETE vs DROP in MySQL? | DELETE removes rows keeping structure; DROP deletes both table schema and rows permanently. |
| 17 | How do you filter empty NULL cells in SQL? | Use WHERE col IS NULL (never = NULL); arithmetic with NULL always equals NULL. |
| 18 | Difference between % and _ in LIKE? | % matches 0 or more characters; _ matches exactly 1 character. |
| 19 | Difference between 9 / 2 and 9 DIV 2 in MySQL? | 9 / 2 gives decimal 4.5000; 9 DIV 2 gives integer quotient 4. |
| 20 | 3 valid comment syntaxes in MySQL? | -- (with space), #, and /* ... */. |
| 21 | Cache Memory speed vs RAM? | Cache runs at 10–30 ns between 2 ns CPU and ~60 ns RAM to reduce CPU idle stalls. |
| 22 | Register holding next instruction address? | Program Counter (PC); MAR holds current memory location. |
| 23 | What is BIOS stored in? | Non-volatile ROM chip on the motherboard (runs POST & loads OS). |
| 24 | Odia Unicode hexadecimal block? | U+0B00 to U+0B7F (e.g., 0B18 = ଘ); DeitY represents India on Unicode Consortium. |
| 25 | Expand OCAC, OSWAN, SAMS & SWAYAM? | Odisha Computer Application Centre; Odisha State Wide Area Network; Student Academic Management System; Study Webs of Active Learning for Young Aspiring Minds. |
Q1. Before grading your practical program in NetBeans, how do you convert a JPasswordField value to String properly?
Answer Explanation: getPassword() returns char[] for security, which converts cleanly via new String(pwd.getPassword()).
Q2. Which MySQL command shows all columns, data types, NULL rules, and keys of table STUDENT?
Answer Explanation: DESCRIBE STUDENT; (short form DESC STUDENT;) displays the column structure of a table.
Q3. What happens if you click a JButton before writing code inside actionPerformed?
Answer Explanation: In event-driven Swing programming, a registered ActionListener method must contain code for the button click to execute logic.
Q4. In the Cloth Showroom Java practical, which pair of control statements is required by textbook Q4(j)?
Answer Explanation: Textbook Q4(j) specifies using switch (for Mill Cloth vs Handloom choice) alongside if-else if ladders (for purchase slabs).
Q5. Which MySQL query correctly gives every student +5 grace marks?
Answer Explanation: UPDATE ... SET updates existing row values; ALTER TABLE only modifies column structure.
Q6. Which property sets a JTextField so the user can see output but cannot edit it?
Answer Explanation: Setting editable to false keeps output selectable/readable while preventing user edits.
Q7. If a practical question states "1 GB = 1000 MB", what is 10 GB in KB (Ch 1 Exercise metric convention)?
Answer Explanation: 10 GB = 10 x 1000 MB = 10,000 MB = 10,000 x 1000 KB = 10^7 KB (10,000,000 KB).
Q8. Which government body developed Odisha e-Procurement?
Answer Explanation: NIC developed e-Procurement for Odisha; OCAC is the state technical directorate.
Previous
Unit 4: IT Applications (5M)
Master Syllabus
1st Year Mindmap & Hub
Next
CHSE Class 11 & 12 Hub (+2 Portal)
Discussion & Queries 0
Post a Comment or Doubt