Class 8

Class 8 Computers Half Yearly 2018

Section A [40 Marks]

Q1. Fill in the blanks:
a) An interactive operating system uses a user interface.
b) A rectangular block of contiguous cells is called a range.
c) A flowchart is a diagrammatic representation of a program.
d) Windows is the most common operating system used nowadays.
e) A computer program is formed of several sets of instructions or algorithm.
f) A reference identifies a cell or a range of cells in a worksheet.
g) Status bar displays information related to the content of the window.
h) Formulas can be entered on the Formula bar or in the cell.
i) A parallelogram represents input/output in a flowchart.
j) The graphical interface uses graphics and images with multimedia support.

Q2. a) Write True or False for the following statements:
i) A mouse can be used to select the items on the screen in CUI. (False)
ii) The error ##### appears if the formula contains an invalid operation. (False)
iii) Connectors can be used in flowcharts. (True)
iv) Date & Time can be found in the Functions library. (True)
v) An operating system requires hardware or software. (False)

b) Write the full forms for the following:
i) CUI: Command User Interface
ii) GUI: Graphical User Interface
iii) WIMP: Windows Icons Menus Pointers
iv) OS: Operating System
v) GCD: Greatest Common Divisor

Q3. a) Match the following:
i) Decision box: diamond
ii) Device management: OS
iii) AutoSum menu: MAX
iv) Symbols are connected: flowlines
v) iOS (Apple): mobile phone

b) Give one word for the following:
i) The process of joining text values. (Concatenation)
ii) A predefined formula that performs specific calculations. (Function)
iii) Identification of a cell or a range of cells in a worksheet. (Reference)
iv) The error message displayed when the formula referring to a cell does not exist. (#REF!)
v) Entering a formula by clicking on the cell instead of typing the cell address. (Pointing)

Q4. Write short answers to the following questions:
a) What is meant by booting?
The process of turning on a computer and loading the operating system into the RAM is known as booting.
b) Mention any two functions of an OS.
Following are the two functions of operating systems:
i) Device management.
ii) File management.
c) Differentiate between relative cell reference and absolute cell reference.
In relative cell referencing, the row and column references can change when we copy the formula to another cell. It is the default cell referencing.
In absolute cell referencing, the row and column references do not change when we copy a formula because the reference points to a fixed cell address. The $ sign is used for absolute referencing.
d) Draw a flowchart for a program which finds the larger of two numbers entered by the user.

Section B [40 Marks]

Q5. a) Write a program to display the following pattern on the screen:

class Pattern{
    public static void main(String args[]){

b) Convert the following expressions into Java expressions:
(i) V =  √(A2 / B5 + C3)
V = Math.sqrt(A * A / Math.pow(B, 5) + C * C * C);
(ii) M = (A ÷ B) × (C ÷ D)
M = (A / B) * (C / D)
(iii) A = 2(L + B)
A = 2 * (L + B)

Q6. a) Write a Java program to store 1293 in a variable. Find and display:
(i) Double of the number.
(ii) Half of the number.
(iii) 3/4 of the number.

class Find{
    public static void main(String args[]){
        int n = 1293;
        int d = n * 2;
        double h = n / 2.0;
        double t = 3.0 / 4 * n;
        System.out.println("Double = " + d);
        System.out.println("Half = " + h);
        System.out.println("Three-fourth = " + t);

b) Write the size in bytes for the following data types in Java:
(i) char – 2 bytes
(ii) long – 8 bytes
(iii) float – 4 bytes

Q7. a) Write a program to input values of u, t and a respectively. Find and display the value of the following expression:
s = ut + ½ at2

class Solve{
    public static void main(String args[]){
        double s = 0.0;
        double u = 0.0;
        double t = 0.0;
        double a = 0.0;
            DataInputStream in = new DataInputStream(;
            System.out.print("u = ");
            u = Double.parseDouble(in.readLine());
            System.out.print("t = ");
            t = Double.parseDouble(in.readLine());
            System.out.print("a = ");
            a = Double.parseDouble(in.readLine());
        }catch(IOException e){}
        s = u * t + 1.0 / 2 * a * t * t;
        System.out.println("s = " + s);

b) State any three rules for writing identifier names in Java.
Following are the three rules for writing identifier names in Java:
(i) It must not be a keyword.
(ii) It can contain alphabet/dollar sign/underscore as the first character.
(iii) Remaining characters can be alphabets, underscores, and digits.

Q8. a) Write a program in Java to input number of days. Find and display number of years, months and days.

class Convert{
    public static void main(String args[]){
        int d = 0;
        int m = 0;
        int y = 0;
            DataInputStream in = new DataInputStream(;
            System.out.print("Number of days: ");
            d = Integer.parseInt(in.readLine());
        y = d / 365;
        d = d % 365;
        m = d / 30;
        d = d % 30;
        System.out.println(y + " years" + m + " months and " + d + " days.");

Q9. a) Write a program in Java to enter temperature in Fahrenheit, and convert it into degree Celsius, and display the result.
c = 5 / 9 (f – 32)

class Temperature{
    public static void main(String args[]){
        double f = 0.0;
        double c = 0.0;
            DataInputStream in = new DataInputStream(;
            System.out.print("Temperature in Fahrenheit: ");
            f = Double.parseDouble(in.readLine());
        c = 5.0 / 9 * (f - 32);
        System.out.println("Temperature in Celsius: " + c);

b) What is the full form of IDE? Name any two IDEs for Java.
IDE stands for Integrated Development Environment.
Eclipse and BlueJ are two IDEs for Java.

Q10. a) Write a program in Java to enter the length of three sides a, b and c of a triangle. All are of type double. Compute and print the area when:
area = √(s(s – a)(s – b)(s – c))

class Triangle{
    public static void main(String args[]){
        double a = 0.0;
        double b = 0.0;
        double c = 0.0;
        double s = 0.0;
        double area = 0.0;
            DataInputStream in = new DataInputStream(;
            System.out.print("a = ");
            a = Double.parseDouble(in.readLine());
            System.out.print("b = ");
            b = Double.parseDouble(in.readLine());
            System.out.print("c = ");
            c = Double.parseDouble(in.readLine());
        s = (a + b + c) / 2;
        area = Math.sqrt(s * (s - a) * (s - b) * (s - c));
        System.out.println("Area = " + area);

b) Name any three data types and the number of bytes needed for its storage.
boolean – 1 byte
int – 4 bytes
double – 8 bytes

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.