IP (IT1120) Mid Exam: Topics, Question Types and a 2-Week Study Plan
Introduction to Programming is the first coding module most IT students take, and the mid exam is where many realise that reading Java and writing Java are two different skills. This guide breaks the mid down into the topics, the question styles and a simple two-week plan that builds both skills.
Always confirm the official format. Your lecturer and the module outline decide the real exam structure, duration and allowed materials. The format described here is the one Study Hub's practice papers follow, based on recent student experience.
1. What Lessons 1–5 cover
- Lesson 1, Introduction: IPO (input–process–output) analysis, algorithms, pseudocode, the three control structures (sequence, selection, repetition), translators (compiler vs interpreter) and how a Java program is compiled to bytecode and run on the JVM.
- Lesson 2, Basic Java programs: program structure,
main, variables and primitive data types, arithmetic operators, operator precedence, integer vs floating-point division and the modulus operator. - Lesson 3, Constants, char and input:
finalconstants, thechartype and its numeric (Unicode) value, type casting and reading input withScanner. - Lesson 4, Sequence and selection: relational and logical operators,
if,if-else, nested and ladderif, andswitch. - Lesson 5, Repetition with while: counter-controlled and sentinel-controlled
whileloops, running totals, averages and sequences.
2. The paper format
Study Hub's mid simulations use a one-hour paper of 100 marks: Section A has 15 MCQs (4 marks each, 60 marks) and Section B has 3 structured Java questions (40 marks). Whatever your official structure is, the split teaches an important point: MCQs reward fast, accurate reading of code, while structured questions reward writing correct, complete code under time pressure. You need to practise both.
A sensible time split for a 60-minute paper is about 25 minutes for the MCQs and 30 for the structured part, leaving 5 minutes to check. Four marks per MCQ means each one is worth a lot; don't rush them to "save time".
3. Answering MCQs
- Trace, don't guess. For "what is the output" questions, write down every variable's value line by line on scrap paper.
- Watch the types.
7 / 2is3, but7 / 2.0is3.5.'A' + 1is66, notB, unless it's cast back tochar. - Read every option. Two options often differ by one character, like a missing space in the output or a
printlnvsprint. - Eliminate first. Remove options that can't compile or don't match the data type, then trace only what's left.
4. Structured Java questions
Structured questions usually describe a small real-world task, such as calculating a bill, a grade or a discount, and ask you to write the program. Markers look for a working structure, not perfect style. A reliable approach:
- Do a quick IPO. List the inputs, the calculation and the outputs before you write any Java.
- Declare variables with the right types (use
doublefor money and averages). - Read input with Scanner, process, then print in the exact format the question shows.
- Handle every condition in the description; a missing branch in an
ifladder is the most common lost mark.
import java.util.Scanner;
public class Average {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int count = 0;
double total = 0;
System.out.print("Enter a mark (-1 to stop): ");
int mark = sc.nextInt();
while (mark != -1) { // sentinel-controlled loop
total += mark;
count++;
System.out.print("Enter a mark (-1 to stop): ");
mark = sc.nextInt();
}
if (count > 0) {
System.out.println("Average = " + (total / count));
} else {
System.out.println("No marks entered");
}
}
}
This short program uses almost every Lesson 1–5 idea: input, a sentinel loop, a running total, a counter, floating-point division and a guard against dividing by zero. If you can write it from memory and explain each line, you are in a good place.
5. Code tracing, the skill that wins marks
Draw a trace table: one column per variable, one row per step. Update only the variable that changes on each line. For loops, add a column for the loop condition so you can see exactly when it becomes false. Students who trace on paper make far fewer "off by one" mistakes than students who trace in their heads.
6. Common Java mistakes that cost marks
- A semicolon straight after
if (...)orwhile (...), which ends the statement early. - Using
=(assignment) instead of==(comparison) in a condition. - Forgetting to update the loop variable, creating an infinite loop.
- Integer division when the answer should have decimals.
- Missing
breakin aswitch, so it falls through to the next case. - Mixing
nextInt()andnextLine()without clearing the leftover newline.
7. A two-week plan
Week 1: understand
- Days 1–2: Lessons 1–2. Rewrite every lecture example yourself without looking.
- Days 3–4: Lesson 3. Practise
chararithmetic, casting and Scanner input. - Days 5–6: Lessons 4–5. Write at least five
ifladder and fivewhileloop programs. - Day 7: one lesson quiz per lesson; write every wrong answer into a mistake log.
Week 2: perform
- Days 8–11: one full timed paper per day, then review every mistake properly.
- Days 12–13: redo only the questions from your mistake log.
- Day 14: light revision, sleep early.