◆ Study Hub By J

Study Hub › Study Guides

EXAM PREP · IT1120

IP (IT1120) Mid Exam: Topics, Question Types and a 2-Week Study Plan

By Janidu Sandaruwan · Updated October 2026 · 5 min read

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

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

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:

  1. Do a quick IPO. List the inputs, the calculation and the outputs before you write any Java.
  2. Declare variables with the right types (use double for money and averages).
  3. Read input with Scanner, process, then print in the exact format the question shows.
  4. Handle every condition in the description; a missing branch in an if ladder 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

7. A two-week plan

Week 1: understand

Week 2: perform

J

Written by Janidu Sandaruwan, an IT undergraduate at SLIIT and the creator of Study Hub By J. Guides are written from a student's point of view; always confirm official rules with your faculty and module outline.

Study Hub By J: a non-profit student help platform, made for university students. 💙
Study Guides · Study Hub · GPA Calculator · Privacy & Policy · About the creator
Independent student project · not officially affiliated with any university · © 2026 Study Hub By J