ICSE · Class 10 · Computer Applications

Class 10 Revision of Class IX Syllabus Mock Test (ICSE)

6 practice questions from Revision of Class IX Syllabus, in the style of your board paper, each with a worked answer and the marks for every step. Then take a full chapter test on paper, snap the pages and get every step marked.

Topics in Revision of Class IX Syllabus

  • Objects and classes
  • Data types and operators
  • Input using Scanner
  • Conditional constructs
  • Iterative constructs and nested loops
  • Mathematical library methods

Revision of Class IX Syllabus practice questions with answers

  1. Q1Multiple choice1 mark
    Which of the following methods of the Scanner class is used to read a single word (token) consisting of characters without spaces?
    1. (a)nextChar()
    2. (b)nextInt()
    3. (c)next()
    4. (d)nextLine()
    Show answer and step marks
    1. Correct option: (c) next()+1
    Answer: (c)
  2. Q2Multiple choice1 mark
    What will be the output of the following code snippet? int m = 5; switch(m) { case 1: System.out.print("One "); case 5: System.out.print("Five "); default: System.out.print("Default"); }
    1. (a)Default
    2. (b)Five Default
    3. (c)One Five Default
    4. (d)Five
    Show answer and step marks
    1. Correct option: (b) Five Default+1
    Answer: (b)
  3. Q3Multiple choice1 mark
    What is the result of the expression intx=9/2+5%2∗3int x = 9 / 2 + 5 \% 2 * 3;?
    1. (a)88
    2. (b)55
    3. (c)77
    4. (d)66
    Show answer and step marks
    1. Correct option: (c) 77+1
    Answer: (c)
  4. Q4Multiple choice1 mark
    How many times will the "Hello" message be printed by the following loop? for(int i = 1; i ≤ 3; i++) { for(int j = 1; j ≤ 2; j++) { System.out.println("Hello"); } }
    1. (a)66
    2. (b)33
    3. (c)22
    4. (d)55
    Show answer and step marks
    1. Correct option: (a) 66+1
    Answer: (a)
  5. Q5Long answer4 marks
    Define a class named Movie with the following specifications: Data members: - title : to store the title of the movie (String) - rating : to store the rating of the movie (double) Member methods: - void accept() : to accept the title and rating of the movie using the Scanner class. - void display() : to display the movie details along with a remark: print "Hit" if the rating is 8.08.0 or above, otherwise print "Average". Write the main method to create an object of the class and invoke the member methods.
    Show answer and step marks
    1. Class declaration `class Movie` with data members `String title; double rating;`.+1
    2. `void accept()` creating a `Scanner` and reading `title` with `nextLine()` and `rating` with `nextDouble()`.+1
    3. `void display()` printing the title and rating, then "Hit" if `rating ≥ 8.0`, otherwise "Average".+1
    4. `main` creating an object with `new Movie()` and calling `accept()` and `display()`.+1
    Answer: import java.util.Scanner; class Movie { String title; double rating; void accept() { Scanner sc = new Scanner(System.in); System.out.print("Enter the title: "); title = sc.nextLine(); System.out.print("Enter the rating: "); rating = sc.nextDouble(); } void display() { System.out.println("Title: " + title); System.out.println("Rating: " + rating); if (rating ≥ 8.0) System.out.println("Hit"); else System.out.println("Average"); } public static void main(String args[]) { Movie m = new Movie(); m.accept(); m.display(); } }
  6. Q6Long answer4 marks
    Write a Java program to define a class named MovieTicket with the following specifications: Data members / instance variables: - String name - to store the customer name - int movietype - to store the type of movie (1 for 3D, 2 for Normal) - double amount - to store the total ticket amount Member methods: - void accept() - to accept the customer name and movie type using the Scanner class. - void calculate() - to calculate the ticket amount. If movietype is 1, amount is ₹ 350.0; if movietype is 2, amount is ₹ 250.0. For any other invalid choice, print "Invalid Choice" and set amount to 0.0. - void display() - to display the customer name and total amount. - void main(String args[]) - to create an object of the class and call the above member methods.
    Show answer and step marks
    1. Class declaration with `String name; int movietype; double amount;`.+1
    2. `void accept()` reading `name` with `nextLine()` and `movietype` with `nextInt()` using a `Scanner`.+1
    3. `void calculate()`: 350.0350.0 for type 11, 250.0250.0 for type 22, otherwise printing "Invalid Choice" and setting `amount = 0.0`.+1
    4. `void display()` printing the customer name and the amount.+0.5
    5. `main` (written `public static void main(String args[])`) creating an object with `new MovieTicket()` and calling `accept()`, `calculate()` and `display()`.+0.5
    Answer: import java.util.Scanner; class MovieTicket { String name; int movietype; double amount; void accept() { Scanner sc = new Scanner(System.in); System.out.print("Enter customer name: "); name = sc.nextLine(); System.out.print("Enter movie type (1 for 3D, 2 for Normal): "); movietype = sc.nextInt(); } void calculate() { if (movietype == 1) amount = 350.0; else if (movietype == 2) amount = 250.0; else { System.out.println("Invalid Choice"); amount = 0.0; } } void display() { System.out.println("Customer name: " + name); System.out.println("Total amount: " + amount); } public static void main(String args[]) { MovieTicket t = new MovieTicket(); t.accept(); t.calculate(); t.display(); } }

Take a full Revision of Class IX Syllabus test

PrepitUp writes a fresh paper on this chapter at the length you pick. Write it on paper with a timer, photograph the pages, and see the marks for every step and what to practise next.

  • 15 min10 marks
  • 30 min20 marks
  • 1.5 hr40 marks
  • 3 hr80 marks
See a sample marked answer sheet

Get your Revision of Class IX Syllabus answers marked

Sign in, pick this chapter and a length, write the test on paper and get every step marked.

Sign in to take this test

More Class 10 Computer Applications mock tests