ISC Practical 2027: Delivery Zone Orders (2-D Array) – Algorithm and Java Program
Fully solved ISC Computer Science Practical 2027 question on a 2-D array of delivery orders: find the zone with the highest total, the above-average days and the days with an increase. Includes the correct output for CISCE’s Example 1, which has errors in the sample.

This is Question 3 of Sample Paper 1 from the specimen questions CISCE has released for the ISC Year 2027 Computer Science Practical (Paper 2). The concept area is Two-dimensional arrays. Below you will find the question, a plain-language explanation of the logic, an exam-ready algorithm, a fully documented Java program, the real output for every sample input, and tips for scoring the full 15 marks.
Every program on this page was compiled with JDK 21 and run on CISCE’s sample inputs, plus extra boundary inputs of the kind a visiting examiner will try.
The question
A food-delivery kitchen records the number of orders received from different delivery zones over several consecutive days. Create a program where rows represent zones (2 ≤ Z ≤ 5) and columns represent days (5 ≤ D ≤ 15). Display INVALID ZONE or INVALID DAYS for sizes outside these ranges. Store the order count for each zone and day and perform the following tasks:
- Highest Total Orders: find the zone with the highest total number of orders over all the days. Display the zone and its total.
- High Demand Days: for each zone, calculate the average daily orders and display the days on which the orders are above the average.
- Increase in Orders: for each zone, find the days on which the orders are higher than on the previous day. Display the zone and each such day.
CISCE gives 4 examples with this question. Each one is shown with its output in the Output section below, so you can check your own program against it.
Note on the CISCE sample: The expected output printed for Example 1 in the CISCE document has three mistakes. Zone 1 totals 4+6+3+7+5+2 = 27, the highest (Zone 2 is 25). Zone 1’s average is 4.5, so Day 5 (5 orders) is also a high-demand day. Zone 3’s average is 4.0, so Day 1 (5 orders) is also above average. Our program prints the correct values. If your examiner’s sheet shows the CISCE values, explain the arithmetic politely.
Understanding the problem
A classic double-dimensional array question. Each task is a different way of walking along a row: summing it, comparing each cell with the row average, and comparing each cell with the cell to its left.
- Row total: write a helper
rowTotal(z)and reuse it for both the highest total and the average. - Average must be a double. Zone 2 in Example 1 has 25 orders over 6 days = 4.17. Integer division gives 4, which would wrongly make the day with 4 orders "not above average" in some data and "above" in others. Use
(double) total / D. - Increase: start from the second day (index 1), because day 1 has no previous day.
- Print None when a zone has no qualifying day, as in Example 2.

Algorithm [3 marks]
Write the algorithm in the planning session, in numbered steps like these. It must match your program exactly.
- Start.
- Input Z and D. If Z < 2 or Z > 5, print "INVALID ZONE" and stop. If D < 5 or D > 15, print "INVALID DAYS" and stop.
- Create ord[Z][D] and input the orders row by row.
- For each zone i, compute total[i] = sum of row i. Find max = the largest total and print every zone whose total equals max.
- For each zone i: avg = total[i] / D (real division). Print the days j + 1 where ord[i][j] > avg, or "None" if there are none.
- For each zone i: print the days j + 1 (for j from 1 to D − 1) where ord[i][j] > ord[i][j − 1], or "None" if there are none.
- Stop.
Java program [7 marks]
The program uses a class with separate methods for each task and comments that explain every data member and the special logic. That is what the 2 documentation marks are for.
import java.util.Scanner;
/**
* ISC Practical 2027 - Sample Paper 1, Question 3
* Analyses daily order counts of delivery zones stored in a 2-D array
* (rows = zones, columns = days).
*/
public class ZoneOrders
{
int ord[][]; // ord[z][d] = orders received from zone z on day d
int Z, D; // number of zones (rows) and days (columns)
ZoneOrders(int z, int d)
{
Z = z;
D = d;
ord = new int[Z][D];
}
void accept(Scanner sc)
{
System.out.println("Enter the orders (one row per zone):");
for (int i = 0; i < Z; i++)
for (int j = 0; j < D; j++)
ord[i][j] = sc.nextInt();
}
// total orders of zone z over all days
int rowTotal(int z)
{
int s = 0;
for (int j = 0; j < D; j++)
s += ord[z][j];
return s;
}
void highestTotal()
{
int max = rowTotal(0);
for (int i = 1; i < Z; i++)
if (rowTotal(i) > max)
max = rowTotal(i);
System.out.println("Highest Total Orders:");
for (int i = 0; i < Z; i++) // prints every zone in case of a tie
if (rowTotal(i) == max)
System.out.println(" Zone " + (i + 1) + " : " + max + " orders");
}
void highDemandDays()
{
System.out.println("High Demand Days:");
for (int i = 0; i < Z; i++)
{
double avg = (double) rowTotal(i) / D; // real division, so 4.17 is not cut to 4
String list = "";
for (int j = 0; j < D; j++)
if (ord[i][j] > avg)
list += (list.equals("") ? "" : ", ") + "Day " + (j + 1);
System.out.println(" Zone " + (i + 1) + " : " + (list.equals("") ? "None" : list));
}
}
void increaseInOrders()
{
System.out.println("Increase in Orders:");
for (int i = 0; i < Z; i++)
{
String list = "";
for (int j = 1; j < D; j++) // day 1 has no previous day
if (ord[i][j] > ord[i][j - 1])
list += (list.equals("") ? "" : ", ") + "Day " + (j + 1);
System.out.println(" Zone " + (i + 1) + " : " + (list.equals("") ? "None" : list));
}
}
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Number of zones: ");
int z = sc.nextInt();
System.out.print("Number of days: ");
int d = sc.nextInt();
if (z < 2 || z > 5)
{
System.out.println("INVALID ZONE");
return;
}
if (d < 5 || d > 15)
{
System.out.println("INVALID DAYS");
return;
}
ZoneOrders ob = new ZoneOrders(z, d);
ob.accept(sc);
ob.highestTotal();
ob.highDemandDays();
ob.increaseInOrders();
}
}Variable description
Name Type Purpose
------------- --------- -------
ord[][] int[][] orders: row = zone, column = day
Z, D int number of zones and days
max int highest zone total
avg double average daily orders of a zone
list String days collected for printing
i, j int row (zone) and column (day) indexesOutput [3 marks]
These are the actual outputs of the program above for every example in the question:
INPUT:
Number of zones: 3
Number of days: 6
4 6 3 7 5 2
2 3 5 4 6 5
5 4 6 3 2 4
OUTPUT:
Highest Total Orders:
Zone 1 : 27 orders
High Demand Days:
Zone 1 : Day 2, Day 4, Day 5
Zone 2 : Day 3, Day 5, Day 6
Zone 3 : Day 1, Day 3
Increase in Orders:
Zone 1 : Day 2, Day 4
Zone 2 : Day 2, Day 3, Day 5
Zone 3 : Day 3, Day 6INPUT:
Number of zones: 2
Number of days: 5
4 4 4 4 4
2 2 2 2 2
OUTPUT:
Highest Total Orders:
Zone 1 : 20 orders
High Demand Days:
Zone 1 : None
Zone 2 : None
Increase in Orders:
Zone 1 : None
Zone 2 : NoneINPUT:
Number of zones: 6
Number of days: 6
OUTPUT:
INVALID ZONEINPUT:
Number of zones: 4
Number of days: 3
OUTPUT:
INVALID DAYSTest it on unknown inputs
One of the 3 output marks is for correct output on inputs the examiner chooses, usually boundary cases. Our program handles these correctly:
INPUT:
Number of zones: 2
Number of days: 5
10 12 9 15 14
15 9 12 10 14
OUTPUT:
Highest Total Orders:
Zone 1 : 60 orders
Zone 2 : 60 orders
High Demand Days:
Zone 1 : Day 4, Day 5
Zone 2 : Day 1, Day 5
Increase in Orders:
Zone 1 : Day 2, Day 4
Zone 2 : Day 3, Day 5How to score full marks on this question

- Print zone and day numbers starting from 1 (i + 1, j + 1), not from the array index 0.
- Handle a tie for the highest total by printing every zone with the maximum. It costs one extra loop and protects the "unknown inputs" mark.
- Run Example 2 (constant rows). It checks that you print None correctly and use strictly greater than.
- Keep the typed program identical to the planned one. Large differences between your planning sheet and the printout cost the 2 hard-copy marks.
Common mistakes to avoid
- Using int for the average.
- Comparing day 1 with a non-existent day 0, which causes ArrayIndexOutOfBoundsException.
- Reading the matrix before checking Z and D. Validate the sizes first, then create and fill the array.
This post is part of our series that solves all 12 specimen questions for the ISC 2027 Computer Science practical, one question a day. Practise writing the algorithm and program on paper in 90 minutes before you type it. That is exactly how the exam works.
Related Posts
Continue learning with these related articles

ISC Practical 2027: Player Tag Analyzer (Teams and Top Scorer) – Algorithm and Java Program
Fully solved ISC Computer Science Practical 2027 question: validate player tags of the form NAME-NUMBER, pair players into teams with the same 3-digit number and find the top scorer. Algorithm, documented Java program, verified outputs and exam tips.

ISC Practical 2027: Account Number Checksum Verifier – Algorithm and Java Program
Fully solved ISC Computer Science Practical 2027 question: validate a 10-digit account number, apply the double-every-second-digit checksum and find the digital root. Includes the algorithm, a documented Java program, verified outputs and exam tips.

ISC Class 11 Computer Science Evaluation II Sample Paper 2026-27 with Solutions
A full ISC Class 11 Computer Science Evaluation II paper for 2026-27 on Boolean algebra, propositional logic, number systems, the full adder, Java class design and Python, with a checked answer key and complete solutions.