Font size
WorksheetsICSE Grade 9 Quiz Computers
Total questions: 67
Worksheet time: 41mins
Is Android based on Java?
True
False
Who invented Java?
James Gosling
Sergey Brin
Steve Jobs
Bill Gates
Tim Berners-Lee
The keyword "method" is another name for
an object
a class
a function
a variable
Where does a java program start executing instructions from:
class
source file
main method
object
Describe method.
A component of a program in a big program.
A program to perform a specific task.
A component of a program written to perform a specific task.
A variable that use to read an input.
Mark all that is TRUE about classes
A Class is a blueprint of an object. It is not an actual object
An object is an instance of a class
A class has characteristics and behaviours
A base class gives all of its characteristics to a derived class
A class is the first thing to define while writing a Java Program
Which level of a programming language is Machine Code?
Low
High
Which level would create the easiest code for humans to understand?
Low
Assembly
High
Python is an example of a High Level programming language
True
False
Which generation?
Machine Code - Low
Assembly Code - Low
High Level
Which of these is an example of an IDE (Integrated Development Environment)?
Notepad
BlueJ
Ruby
Python
Choose all the pairs that are correctly matched
Bits and Bytes - Machine Language
Assembly Language - Assembler
Java - Compiler
4GL - Non procedural languages
5GL - Specify constraints
What is a programming paradigm? (Mark all that apply)
The organising principle of a program
The approach to programming
The question answered by the program
The programming language used
Choose all the correctly matched pairs
2GL - Assembler - Operations and Operands
3GL -How
4GL - What
5GL - Constraints
3GL - C++, Java
The first generation of computer languages in which we encounter loops and if conditions is:
2GL
3GL
4GL
5GL
Examples of 5GL
Prolog (Programming Logic)
Fortran
Ruby
OPS5
Mercury
All of these are programming paradigms except:
Procedural
Structural
Modular
Object Oriented
Object Driven
Choose the correctly matched pairs
Focus on how to do things - Object Oriented
Focus on how to do things - Procedural
Focus on Data - Object Oriented Programming
Breaking down a large program into smaller, manageable, independent parts - Modular Programming
Which of these is the correct definition of a module?
A module is an identifiable piece of code within a program, with a set of inputs and outputs. It has a sole purpose, and processes the inputs in a way dictated by its goal and produces an output.
A module is a piece of code with a set of inputs and outputs. It has a sole purpose, and processes the inputs in a way dictated by its goal and produces an output.
A module is an identifiable piece of code within a program, with a set of inputs and outputs. It processes the inputs in a way dictated by its goal and produces an output.
A module is an identifiable piece of code within a program. It has a sole purpose, and processes inputs and outputs.
Cross Coupling refers to:
Referential integrity
The extent to which one module depends on another
Using one public class in another package
Using one method in more than one class
Modules must have data passed to them. They cannot have data of their own to work with.
True
False
Which of these is not one of the limitations of procedural programming?
It does not model the real world well.
It focuses on procedure rather than the data, while it is data that drives the process.
Change in a datatype needs to be propagated to all the functions that use that data type. This is a time consuming and error prone process.
Each module represents data and its interface
Which of these is the correct definition of an object?
An object is an identifiable entity with some characteristics (data) and behaviour (functions)
An object is an entity with some characteristics (data) and behaviour (functions)
An object is an identifiable entity with some characteristics and data.
An object is an identifiable entity with some behaviour and functions.
All of these are ways in which OOP overcomes the shortcomings of Procedural Programming except:
OOP gives data the prime consideration and provides an interface between objects through functions.
An object is a complete entity. All the data and association functions are contained within a single object.
Derived classes automatically inherit all the data and functions of the base class.
The act of representing the essential features without including the background details is
(a)
Data abstraction is made possible by
Encapsulation
Data Hiding
Cross Coupling
The wrapping up of data and operations / functions into a single unit (class) is called:
Data Abstraction
Encapsulation
Object Oriented Paradigm
If we want to see any data in an object, we cannot see it directly. We have to use a ___________ or a ______________ to fetch the data.
module, function
method, member function
class, object
abstraction, encapsulation
System.out.println("Hello, World!");
Will:
Print Hello World on screen
Return a syntax error
Which of these is the correct difference between java applets and standalone applications?
Applets are embedded into html pages and do not usually access the hard drive of the user. They need the internet to work. e.g., a Javascript to show a video on the web page. Standalone applications work on the device of the user. They do not necessarily need the internet to work. e.g., a word processing program.
Applets are embedded into html pages and they need the internet to work. Standalone applications work on the device of the user. They do not necessarily need the internet to work.
Applets need the internet to work. e.g., a Javascript to show a video on the web page. Standalone applications do not necessarily need the internet to work. e.g., a word processing program.
One of these statements is correct. Which one?
Since classes use the concept of abstraction, they are called Abstract Data Types (ADTs). They are a data type because each class can be used to create objects of its own type.
Since classes use the concept of encapsulation, they are called Encapsulated Data Types (EDTs). They are a data type because each class can be used to create objects of its own type.
Inheritance is used to transfer data and functions from a base class to all derived classes.
True
False
Inheritance is the _______
Capability of one class to inherit properties from another class.
Capability of classes and modules to inherit properties from another class or module.
_________________ is the key to the power of object oriented programming.
Polymorphism
Abstraction
Encapsulation
5GL
_________________ is the ability of a message or data to be processed in more than one form.
Polymorphism
Accidental Alteration
Encapsuation
_______________ is the difference between Object Based Languages (OBL) like Ada and Object Oriented Programming Languages like Java.
Polymorphism
Abstraction
The advantages of OOPS are (mark all that apply)
Ease of comprehension
Closer to real world models
Reusable code
Easy redesign and extension
Ease of fabrication and maintenance
The disadvantages of OOP are: (Mark all that apply)
Classes tend to be overly generalised
The relations among classes become artificial at times
Tricky Program Design
Specific Design and Programming Skills are required
Java is a case sensitive language
True
False
A single line comment is represented by (a) in Java.
The symbols to start a multi-line comment in a Java code are:
(a)
Bytecode is the same for all platforms. This is because:
Bytecode is in machine language.
Bytecode is then taken by the JVM and converted to machine language according to the platform
Bytecode is the version of code that lies between compiled code and interpreted code.
Bytecode is generated one line at a time (or Just in Time) and then passed to the JVM for execution.
Java is both a language and a platform.
True
False
The process of converting source code into machine code is called (a) .
Choose the pairs that are rightly matched.
One line at a time - Interpreter
One line at a time - Compiler
Source Code at one go - Compiler
Source Code at one go - Interpreter
Native Executable Code is another name for
Bytecode
Machine Code
Assembly Language
3GL
Java Bytecode is:
Machine language for any platform
Machine Language for the JVM, which then interprets it, one line at a time, for the platform
Java Package is a collection of various
Objects
Methods
Classes
(a) is the default package of java programming. It is automatically imported in any Java program.
_________________ are the keywords that carry special meaning for the Java Compiler. They are used for writing java statements and cannot be used to name a variable.
Java keywords
Java Reserved Words
Java.io
Java.var
Ram has tried to list the basic structure for writing a program in Java. Can you check if his order is right. If not, there are some options, at least one of which is definitely correct. Can you mark that option?
Ram's Structure is:
A. Comments
B. Declaration of Class
C. Declaration of main() function
D. The termination of each statement (;)
E. The closing of curly braces to indicate the end of a block of code.
Ram's answer is right.
BACDE
ACBDE
DCABE
What is the significance of this line of code:
public static void main(String args[])
It defines the first function that will be executed
It defines the first class to be executed
It defines the first object that will be accessed
None of the above
In BlueJ, stripes on the icon of a class mean that:
The class is public
The class has not been compiled yet
In BlueJ, compilation also saves the code.
True
False
A Java program can become a standalone application only if it has the method:
main( )
main()
Main( )
Main()
Identify the right definition of object.
An Object is an identifiable entity with some characteristics (aka properties or attributes), a state, and behaviour.
An Object is an identifiable entity with some properties or attributes and behaviour.
An Object is an entity with some characteristics (aka properties or attributes), a state, and behaviour.
All objects have three essential features encapsulated (choose the right ones):
State through methods
Behaviour through data
State through Properties or Attributes
Behaviour through Methods
Identity - Unique Name
Which of these is MOST ACCURATE about the state of an object
The state of an object encompasses all the static properties of an object as well as the methods of each of these properties.
The state of an object encompasses all the static properties of an object as well as current (dynamic) values of each of these properties.
The state of an object encompasses all the static properties of an object as well as the member functions of each of these properties.
The state of an object indicates whether the object is currently active or not.
Objects communicate with each other by:
Classes
Methods
Message Passing
Encapsulation
In software terms, classes and objects are implemented by representing the attributes as ________ and behaviour through _________________.
Data numbers, Number functions
Data Members, Member Functions
Properties, Modules
The keyword "method" is another name for
an object
a class
a function
a variable
