Class 9 Computer Applications Exam Paper
Class 9 Computer Applications Exam Paper
The formula A = P(1+R/100)^T calculates the final amount A after applying the interest rate R over the investment duration T on the principal amount P. It applies the concept of compound interest, where the principal grows by a rate R annually, compounded over T years .
The remote control example illustrates the principle of abstraction in object-oriented programming. Abstraction involves interacting with an object through its interface without needing to understand the internal workings. In this case, using a remote control to change TV channels without knowing how it works internally exemplifies abstraction .
Polymorphism is important because it allows objects to take on multiple forms depending on the context, as demonstrated by a person acting as a father, teacher, or customer in different scenarios. This facilitates flexibility and reusability in code, allowing a single interface to represent different underlying data types or classes .
Java is known for its platform independence, achieved through bytecode executed on the Java Virtual Machine. It offers robust security features, automatic memory management via garbage collection, and a rich standard library. Java’s object-oriented nature promotes clear, modular programs .
Java compilation involves converting code into bytecode using the Java compiler, which is then executed on any Java Virtual Machine, ensuring platform independence. Traditional compiled languages convert code directly into machine code specific to the instruction set of a CPU, limiting portability .
The logical error in the switch case code is the absence of break statements for cases 1 and 3. When "n" equals 1, the output would print "OneTwo" because the execution does not terminate at case 1 without a break, leading to the execution of subsequent statements until a break is encountered .
Math.pow() takes two arguments, a base and an exponent, returning the base raised to the power of the exponent, useful for calculations involving exponential growth or scientific computing. Math.ceil() rounds a decimal number up to the nearest integer and is used when precise ceiling calculations in decimal number operations are needed .
Primitive data types in Java, such as int and char, store simple values and have a fixed size. Composite data types, like arrays and classes, can store multiple values and are more complex, supporting data structures with varying types and sizes. They allow for structured data representation beyond simple values .
Abstraction focuses on hiding complex implementation details, allowing interaction with simpler interfaces, as in controlling a TV via remote without knowing internal operations. Encapsulation involves bundling data with methods that operate on them while restricting direct access, like private fields accessed via public methods in a Java class .
Operators in Java can be classified as unary, binary, or ternary based on the number of operands. Unary operators, such as ++ and !, require a single operand. Binary operators, like + and !=, require two operands. The ternary operator ? :, requires three operands .

![5.
a)
Consider the following code segment
[2X5=10]
int a=15, b=10;
if(x>70)
{
If(x<80)
a+=b;
}](/p?url=https%3A%2F%2Fscreenshots.scribd.com%2FScribd%2F252_100_85%2F326%2F522873450%2F2.jpeg&__src=https%3A%2F%2Fwww.scribd.com%2Fdocument%2F522873450%2FClass-9-Computer-Applications&__type=image)
