0% found this document useful (0 votes)
726 views26 pages

Grade 10 Computer Applications Assessment

Uploaded by

thedagger.1202
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
726 views26 pages

Grade 10 Computer Applications Assessment

Uploaded by

thedagger.1202
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Bombay Scottish School, Mahim

PRELIMINARY ASSESSMENT
COMPUTER APPLICATIONS
Grade : 10 Max. Marks : 100
Date : 14.01.2025 No. of Questions : 08
Duration : 2 hours No. of Printed side : 09
Answers to this Paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the question paper.
The time given at the head of this Paper is the time allowed for writing the answers.
This Paper is divided into two Sections.
Attempt all questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions are given in brackets[ ].
________________________________________________________________________________
SECTION A
(Attempt all questions from this Section)

Question 1 [20]
Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answer only.)

(i)

Consider the above picture. Choose the statement which is incorrect.


(a) User can operate the ATM machine with the essential features like
the buttons and the screen available.
(b) The picture depicts the abstraction feature of OOP.
(c) The complexity of the machine is hidden from the user.
(d) The machine can be operated only if the inner mechanism is known by the
user.

(ii) Choose the odd one from the following:


(a) Math
(b) util
(c) Scanner
(d) String

1
(iii) The method that does not have any parameters:
(a) floor()
(b) random()
(c) round()
(d) min()

(iv) Which of the following is incorrect in the context of Java compilation


process?

(a) Program written in Java is the source code with .java as its file name
extension.
(b) Java byte code is also called an object code.
(c) Java byte code is the code obtained after the compilation process.
(d) JVM is the interpreter which converts Java byte code into machine
language.

(v) [Link]("click".lastIndexOf('c')+"arch".indexOf('C'));
will print:
(a) 3
(b) 2
(c) 5
(d) 0

(vi) char m[] = {'Z', 'X','@','r','9'};


[Link](m[2]) would generate the answer:

(a) true
(b) false
(c) error
(d) 2

(vii) What is incorrect about the parameterized constructor?

(a) It is also called a default constructor.


(b) It has the parameters written in the prototype.
(c) There can be multiple parameterized constructors in a class.
(d) It is invoked by passing the required values.

(viii) Choose the correct option to convert T to t:


(a) [Link]('T','t')
(b) "T".toLowerCase("t")
(c) [Link]('T','t')
(d) [Link]("T")

2
(ix) Choose the correct option about method overloading in Java:
(a) overloaded methods must have same name and different signatures.
(b) overloaded methods must be defined in a certain order.
(c) overloaded methods must be void.
(d) Method overloading implements encapsulation feature.

(x) Which of the following shows syntax error?


(a) double a= [Link](3,-1);
(b) int c=4/0;
(c) int x[4] = {2,4,6,8};
(d) for(int i=10;i>0;i++)

(xi) Accepting a character value from user and assigning it to variable x using the
Scanner class object named sc:
(a) char x= [Link](0);
(b) char x= [Link]().(0);
(c) char x=[Link]().substring(0,1);
(d) char x=[Link]().charAt(0);

(xii) In call by value, the data type of the parameters is:


(a) primitive
(b) composite
(c) reference
(d) non primitive

(xiii) The loop which checks the condition at the end of every iteration:
(a) exit-controlled loop
(b) entry-controlled loop
(c) time delay loop
(d) infinite loop

(xiv) "Quick".startsWith("ck") returns:


(a) true
(b) false
(c) 2
(d) 0

(xv) Which of the following is not a jump statement?


(a) if
(b) break
(c) return
(d) continue

3
(xvi) String z="16.5";
double r=[Link](z);
[Link](z+5);
[Link](r+5);

(a) 16.55
21.5
(b) 21
21

(c) 17
21.5

(d) 1655
215

(xvii) The loop not equivalent to the following for loop:


for(int a=5,i=a;i>=a;i--)
[Link](a++);

(a) int a=5,i=a;


while(i>=a)
{
[Link](a);
a=a+1;
i -=1;
}

(b) int a=4,i=a;


do
{
a=a+1;
[Link](a);
i - =1;
} while(i>=a);

(c) for(int a=5,i=a;i<a;i++)


[Link](a);

(d) for(int a=6,i=a-1;i==5;i++)


[Link](--a);

4
(xviii) When an object of a Wrapper class is converted to its corresponding
primitive data type, it is called as:

(a) Boxing
(b) Unboxing
(c) Explicit conversion
(d) Implicit conversion

(xix) The resultant values of individual brackets and the final answer, if a=1:
(a++ < a++) && ([Link](3,a)==3)
(a) true && false, false
(b) false && false, false
(c) false && true, false
(d) true && true, true

(xx) Assertion(A): Binary search is performed on an unsorted array.


Reason(R): In Binary search, the value to be searched for is compared with
the mid value of the array.

(a) Both Assertion (A) and Reason (R) are true.


(b) Both Assertion (A) and Reason (R) are false.
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true

Question 2 [20]

(i) Rewrite the following code using the ternary operator and the resultant
value of ans variable : [2]

double r=9.2,s=9.8,ans;
if([Link](r)>s)
ans =r;
else
ans=s;

(ii) Given that, x=3 and y=4 evaluate the following expression to find x:
x *= x-y++ + x/y; [2]

5
(iii) Read the following code snippet and answer the questions below: [2]
String s="Achieve ";
int a=[Link]('e');
switch(a)
{
case 2: [Link]([Link]("Confidence"));break;
case 4: [Link]([Link]("Success"));break;
case 0: [Link]([Link]("Growth"));break;
case 8: [Link]([Link]("Power"));break;
case 6: [Link]([Link]("Goals"));break;
}

(a) Write the output of the code snippet.


(b) Write the output if indexOf() is replaced with lastIndexOf()

(iv) Write the difference between private and protected access specifiers. [2]

(v) Write the output of the following String methods: [2]


(a) [Link]( "String".compareTo("Strange") );
(b) [Link]( "mark".endsWith("K") );

(vi) Write the output of the following code snippet: [2]


char c[ ]={71,79,65,76};
for(int a=0;a<=3;a++)
{ char ch= c[a];
[Link](ch);
}

(vii) Read the code and fill the blanks numbered 1 to 4 with the correct answers
to help Lavanya finding the reverse of the number: [2]
int revnum(int x)
{
int a,b=0;
while(x>0)
{
a=x 110;
b=b*2+a;
3 /=10;
}
return 4;
}

6
(viii) A student is trying to print the alphabets ‘A’ to ‘E’ using the following code.
However, the code has an error. Name the error(syntax/logical/runtime).
Rewrite the corrected code. [2]
int i;
for(i=65;i<=69;i++)
[Link](i);

(ix) Predict the output of the following code snippet:


char b[]= { 'i', 'N', 'S', 't', 'a', 'N', 'C', 'e'};
String s=[Link](b);
for(int i=[Link]()-1;i>0;i--)
if([Link]([Link](i)))
[Link]([Link]([Link](i)));
else
continue;

3
√𝑥+𝑦
(x) Write the Java expression for 2 [2]
√𝑦

SECTION B
(Answer any four questions from this Section)
The answers in this Section should consist of the Programs in either Blue J
environment or any program environment with Java as the base.
Each program should be written using Variable descriptions/Mnemonic Codes so
that the logic of the program is clearly depicted.
Flow-Charts and Algorithms are not required.

Question 3 [15]

Define a class with the following specifications:


Class name : ParkHub

Member variables:

String name : Name of the vehicle owner


int regno : registration number of the vehicle owner
int hrs : Number of hours the vehicle is parked
double charges : Parking charges to be paid

7
Member methods:
ParkHub() : default constructor
void accept() : accept the required details of the vehicle owner using
Scanner class
void charges() : to calculate the charges to be paid for parking the vehicle
as per given in the following table:

Number of hours Rate per


hour
First 5 hours ₹5
Next 5 hours ₹ 4.5
Above 10 hours ₹ 3.5

void disp() : to print the member details with appropriate messages.


Write the main method to create an object of the class and invoke the other
methods.

Question 4 [15]

Define a class to accept the names of students in an array of size 20. Arrange the
names in the ascending order using selection sort technique. Display the original
array and the sorted array with the appropriate messages.

Question 5 [15]

Define a class to accept a number. Find and print the number and the difference
between its largest digit and smallest digit along with an appropriate message.

Example:
Input: 41653
Output: 5 i.e 6-1=5

Question 6 [15]

Define a class to accept integer values into a double dimensional array of size
4×4. Print the array elements in a matrix(tabular) format. Further, print the sum
of the odd numbers from each row.
Example:
a [ ][ ]={ {1,4,7,9}, { 2,6,8,1}, { 3,7,2,5}, {6,8,1,4}};

Output:
Elements in a matrix form:
1 4 7 9
2 6 8 1
3 7 2 5
6 8 3 4
8
Sum of odd numbers in row 1: 17
Sum of odd numbers in row 2: 1
Sum of odd numbers in row 3: 15
Sum of odd numbers in row 4: 11

Question 7 [15]

Define a class to accept the names of five employees and their organizations in
two single dimensional arrays of type string. Create the third string array
which contains the email id of the employee generated by adding in the order
the name of the employee, character ‘@’, organization of the employee and the
string “.in”. The email id must contain all lowercase letters.
For e.g.
Name of the employee: John
Name of the organization: KPS
email-Id: john@[Link]
Print all the three arrays with the appropriate messages.

Question 8 [15]

Define a class to overload the method number() as follows:


void number(int n):To print n terms of a fibonacci series.
Fibonacci series → 0,1,1,2,3,5,8…...

void number(int x, int y):To find the square root of the greater of the two
numbers using the appropriate functions of Math
class.

void number():To print the following number pattern using nested loop:
12345
1234
123
12
1
_____________________________________________________________________________

9
Bombay Scottish School, Mahim

PRELIMINARY ASSESSMENT

COMPUTER APPLICATIONS

Answer key/Marking scheme

Date:14.01.2025

Answers to this Paper must be written on the paper provided separately.


You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the question paper.
The time given at the head of this Paper is the time allowed for writing the answers.

This Paper is divided into two Sections.


Attempt all questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions are given in brackets[ ].
____________________________________________________________________________________

SECTION A
(Attempt all questions from this Section)

Answer 1 [20]

Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answer only.)

(i)

Consider the above picture. Choose the statement which is incorrect.


(a) User can operate the ATM machine with the essential features like the buttons
and the screen available.
(b) The picture depicts the abstraction feature of OOP.
(c) The complexity of the machine is hidden from the user.
(d) The machine can be operated only if the inner mechanism is known by
1
the user.

(ii) Choose the odd one from the following:

(a) Math
(b) util
(c) Scanner
(d) String

(iii) The method that does not have any parameters:


(a) floor()
(b) random()
(c) round()
(d) min()

(iv) Which of the following is incorrect in the context of Java compilation process?
(a) Program written in Java is the source code with .java as its file name
extension.
(b) Java byte code is also called an object code.
(c) Java byte code is the code obtained after the compilation process.
(d) JVM is the interpreter which converts Java byte code into machine language.

(v) [Link]("click".lastIndexOf('c')+"arch".indexOf('C'));
will print:

(a) 3
(b) 2
(c) 5
(d) 0

(vi) char m[] = {'Z', 'X','@','r','9'};


[Link](m[2]) would generate the answer:
2
(a) true
(b) false
(c) error
(d) 2

(vii) What is incorrect about the parameterized constructor?

(a) It is also called a default constructor.


(b) It has the parameters written in the prototype.
(c) There can be multiple parameterized constructors in a class.
(d) It is invoked by passing the required values.

(viii) Choose the correct answer to convert T to t:


(a) [Link]('T','t')
(b) "T".toLowerCase("t")
(c) [Link]('T','t')
(d) [Link]('T')

(ix) Choose the correct option about method overloading in Java:


(a) overloaded methods must have same name and different signatures.
(b) overloaded methods must be defined in a certain order.
(c) overloaded methods must be void.
(d) Method overloading implements encapsulation feature.

(x) Which of the following shows syntax error?

(a) double a= [Link](3,-1);


(b) int c=4/0;
(c) int x[4] = {2,4,6,8};
(d) for(int i=10;i>0;i++)

(xi) Accepting a character value from user and assigning it to variable x using the
Scanner class object named sc:
3
(a) char x= [Link](0);
(b) char x= [Link]().(0);
(c) char x=[Link]().substring(0,1);
(d) char x=[Link]().charAt(0);

(xii) In call by value, the data type of the parameters is:

(a) primitive
(b) composite
(c) reference
(d) non primitive

(xiii) The loop which checks the condition at the end of every iteration:
(a) exit-controlled loop
(b) entry-controlled loop
(c) time delay loop
(d) infinite loop

(xiv) "Quick".startsWith("ck") returns:

(a) true
(b) false
(c) 2
(d) 0

(xv) Which of the following is not a jump statement?


(a) if
(b) break
(c) return
(d) continue

(xvi) String z="16.5";


double r=[Link](z);

4
[Link](z+5);
[Link](r+5);

(a) 16.55
21.5

(b) 21
21

(c) 17
21.5

(d) 1655
215

(xvii) The loop not equivalent to the following for loop:


for(int a=5,i=a;i>=a;i--)
[Link](a++);

(a) int a=5,i=a;


while(i>=a)
{
[Link](a);
a=a+1;
i -=1;
}

(b) int a=4,i=a;


do
{
a=a+1;
[Link](a);
i -=1;
} while(i>=a);

(c) for(int a=5,i=a;i<a;i++)


[Link](a);

(d) for(int a=6,i=a-1;i==5;i++)


[Link](--a);
5
(xviii) When an object of a Wrapper class is converted to its corresponding primitive data
type, it is called as:

(a) Boxing
(b) Unboxing
(c) Explicit conversion
(d) Implicit conversion

(xix) The resultant values of individual brackets and the final answer, if a=1:
(a++ < a++) && ([Link](3,a)==3)
(a) true && false, false
(b) false && false, false
(c) false && true, false
(d) true && true, true

(xx) Assertion(A): Binary search is performed on an unsorted array.

Reason(R): In Binary search, the value to be searched for is compared with the mid
value of the array.

(a) Both Assertion (A) and Reason (R) are true.

(b) Both Assertion (A) and Reason (R) are false.

(c) Assertion (A) is true and Reason (R) is false

(d) Assertion (A) is false and Reason (R) is true

Answer 2 [20]

(i) Rewrite the following code using the ternary operator and the resultant value of ans
variable : [2]
double r=9.2,s=9.8,ans;
if([Link](r)>s)
ans =r;
else
ans=s;

double r=9.2,s=9.8,ans;
6
ans=[Link](r)>s?r:s;
ans variable value is 9.2

(ii) Given that, x=3 and y=4 evaluate the following expression to find x:
x *= x-y++ + x/y; [2]

x = -3

(iii) Read the following code snippet and answer the questions below: [2]
String s="Achieve ";
int a=[Link]('e');
switch(a)
{
case 2: [Link]([Link]("Confidence"));break;
case 4: [Link]([Link]("Success"));break;
case 0: [Link]([Link]("Growth"));break;
case 8: [Link]([Link]("Power"));break;
case 6: [Link]([Link]("Goals"));break;
}

(a) Write the output of the code snippet.


Achieve Success
(b) Write the output if indexOf() is replaced with lastIndexOf()
Achieve Goals

(iv) Write the difference between private and protected access specifiers. [2]
Private access is limited to the class only, the methods and variables declared
as private cannot be accessed from outside the class. Protected access is within
the package and outside the package through the child class.

(v) Write the output of the following String methods: [2]


1. [Link]( "String".compareTo("Strange") );
8
2. [Link]( "mark".endsWith("K") );
false

(vi) Write the output of the following code snippet: [2]


char c[ ]={71,79,65,76};
for(int a=0;a<=3;a++)
{ char ch= c[a];
[Link](ch);
}
7
GOAL

(vii) Read the code and fill the blanks numbered 1 to 4 with the correct answers to help
Lavanya finding the reverse of the number: [2]
int revnum(int x)
{
int a,b=0;
while(x>0)
{
a=x 110;
b=b*2+a;
3 /=10;
}
return 4;
}
1= %
2 =10
3= x
4= b;

(viii) A student is trying to print the alphabets ‘A’ to ‘E’ using the following code. However,
the code has an error. Name the error(syntax/logical/runtime). Rewrite the corrected
code. [2]
Logical error

int i;
for(i=65;i<=69;i++)
[Link]((char)i);

(ix) Predict the output of the following code snippet:


char b[]= { 'i', 'N', 'S', 't', 'a', 'N', 'C', 'e'};
String s=[Link](b);
for(int i=[Link]()-1;i>0;i--)
if([Link]([Link](i)))
[Link]([Link]([Link](i)));
else
continue;
EAT
3
√𝑥+𝑦
(x) Write the Java expression for 2 [2]
√𝑦
double ans= [Link]((x+y))/[Link](y);

8
SECTION B
(Answer any four questions from this Section)
The answers in this Section should consist of the Programs in either Blue J
environment or any program environment with Java as the base.
Each program should be written using Variable descriptions/Mnemonic Codes so
that the logic of the program is clearly depicted.
Flow-Charts and Algorithms are not required.

Answer 3 [15]

Define a class with the following specifications:


Class name : ParkHub

Member variables:

String name : Name of the vehicle owner


int regno : registration number of the vehicle owner
int hrs : Number of hours the vehicle is parked
double charges : Parking charges to be paid

Member methods:
ParkHub() : default constructor
void accept() : accept the required details of the vehicle owner using
Scanner class
void charges() : to calculate the charges to be paid for parking the vehicle
as per given in the following table:

Number of hours Rate per


hour
First 5 hours ₹5
Next 5 hours ₹ 4.5
Above 10 hours ₹ 3.5

void disp() : to print the member details with appropriate messages.

Write the main method to create an object of the class and invoke the other
methods.
import [Link].*;
class ParkHub
{
String name;
int regno;
9
int hrs;
double charges;

ParkHub()
{
name="";
regno=0;
hrs=0;
}

void accept()
{ Scanner sc = new Scanner([Link]);
[Link]("Enter the name of the vehicle owner..");
name=[Link]();
[Link]("Enter the registration number of the vehicle owner..");
regno=[Link]();
[Link]("Enter the number of hours the vehicle is parked...");
hrs=[Link]();
}//method ends
void charges()
{
if(hrs<=5)
charges=5*hrs;
else if(hrs>5 && hrs<=10)
charges=5*5+(hrs-5)*4.5;
else if(hrs>10)
charges=5*5+5*4.5+(hrs-10)*3.5;

}//method ends
void disp()
{
[Link]("Name:"+name);
[Link]("Registration number:"+regno);
[Link]("Number of hours vehicle parked:"+hrs);
[Link]("Charges for parking:"+charges);

}//method ends
public static void main()
{
ParkHub obj = new ParkHub();
[Link]();
[Link]();
[Link]();
}//method ends
}//class ends
[member var.-2,methods-8,object cr. Method invoke-3,VDT-2]

10
Answer 4 [15]

Define a class to accept the names of students in an array of size 20. Arrange the
names in the ascending order using Selection sort technique. Display the original
array and the sorted array with the appropriate messages.

import [Link].*;

class SortNames

public static void main()

{ Scanner sc=new Scanner([Link]);

String name[]=new String[20];

[Link]("Enter the names of 20 students...");

for(int i=0;i<[Link];i++)

name[i]=[Link]();

[Link]("\fOriginal array.. ");

for(int i=0;i<[Link];i++)

[Link](name[i]);

for(int i=0;i<[Link];i++)

{int sel=i;String min=name[i];

for(int j=i+1;j<[Link];j++)

if(name[j].compareToIgnoreCase(min)<0)

{sel=j;min=name[j];}

11
name[sel]=name[i];name[i]=min;

[Link]("Sorted array");

for(int i=0;i<[Link];i++)

[Link](name[i]); }//method ends

}//class ends

[array input-4 sorting-7,output-2,VDT-2]

Answer 5 [15]

Define a class to accept a number. Find and print the number and the difference
between its largest digit and smallest digit along with an appropriate message.

Example:
Input: 41653
Output: 5 i.e 6-1=5
import [Link].*;
class LdiffS
{
public static void main()
{
Scanner sc=new Scanner([Link]);
[Link]("Enter a number..");
int n=[Link]();
int n1=n;
int l=0,s=9;
while(n1>0)
{
int r=n1%10;
if(r>l)
12
l=r;
if(r<s)
s=r;
n1 /=10;
}
[Link]("Difference between largest and smallest digit of the
number "+n+"("+l+"-"+s+")= "+(l-s));}}
[input-1,variables-3, greater-smaller -6,output-3,VDT-2]

Answer 6 [15]

Define a class to accept integer values into a double dimensional array of size 4×4. Print
the array elements in a matrix(tabular) format. Further, print the sum of the odd
numbers from each row.
Example:
a [ ][ ]={ {1,4,7,9}, { 2,6,8,1}, { 3,7,2,5}, {6,8,1,4}};

Output:
Elements in a matrix form:
1 4 7 9
2 6 8 1
3 7 2 5
6 8 3 4

Sum of odd numbers in row 1: 17


Sum of odd numbers in row 2: 1
Sum of odd numbers in row 3: 15
Sum of odd numbers in row 4: 11

//a [ ][ ]={ {1,4,7,9}, { 2,6,8,1}, { 3,7,2,5}, {6,8,1,4}};

import [Link].*;
class TwoDarray
{
public static void main()
{
Scanner sc=new Scanner([Link]);
int a[][]=new int[4][4];
[Link]("Enter the numbers in a 4X4 matrix...");
for(int i=0;i<[Link];i++)
for(int j=0;j<a[0].length;j++)
a[i][j]=[Link]();
//printing the array
13
[Link]("Elements of the array in matrix form\n");
for(int i=0;i<[Link];i++)
{
for(int j=0;j<a[0].length;j++)
[Link](a[i][j]+" ");
[Link]();
}//loop ends
[Link]("\n");
for(int i=0;i<[Link];i++)
{ int sum=0;
for(int j=0;j<a[0].length;j++)
if(a[i][j]%2!=0)
sum +=a[i][j];
[Link]("Sum of odd numbers in row "+(i+1)+" "+sum);
}

}//main ends
}//class ends

[array dceclaration-2,input-3,calculation-5,output-3,VDT-2

Answer 7 [15]

Define a class to accept the names of five employees and their organizations in
two single dimensional arrays of type string. Create the third string array
which contains the email id of the employee generated by adding in the order
the name of the employee, character ‘@’, organization of the employee and the
string “.in”. The email id must contain all lowercase letters.
For e.g.
Name of the employee: John
Name of the organization: KPS
email-Id: john@[Link]
Print all the three arrays with the appropriate messages.
import [Link].*;
class emailId
{
public static void main()
{
Scanner sc=new Scanner([Link]);
String n[]=new String[5];
String or[]=new String[5];
String emid[] = new String[5];
[Link]("Enter the names of five employees");
for(int i=0;i<[Link];i++)
n[i]=[Link]();
14
[Link]("Enter their organizations");
for(int i=0;i<[Link];i++)
or[i]=[Link]();
[Link]("Emails Ids generated for all employees:");
for(int i=0;i<[Link];i++)
{
emid[i]=n[i].toLowerCase()+"@"+or[i].toLowerCase()+".in";
[Link](emid[i]);
}//loop ends
}//method ends
}//class ends

[array dceclaration-3,input-2,generating array-5,output-3,VDT-2

Answer 8 [15]

Define a class to overload the method number() as follows:


void number(int n):To print n terms of a fibonacci series.
Fibonacci series → 0,1,1,2,3,5,8…...

void number(int x, int y):To find the square root of the greater of the two
numbers using the appropriate functions of Math
class.

void number():To print the following number pattern using nested loop:
12345
1234
123
12
1
import [Link].*;
class NumOverload
{
void number(int n)
{

int a=0,b=1,c;
[Link]("\n"+a+",");
[Link](b+",");

for(int i=3;i<=n;i++)
{
c=a+b;
[Link](c+",");
a=b;b=c;

15
}
}//method ends
void number(int x,int y)
{

[Link]("\n"+[Link]([Link](x,y)));

}//method ends
void number()
{[Link]("\n\n"+"Number pattern:");
for(int i=5;i>=1;i--)
{for(int j=1;j<=i;j++)
[Link](j);
[Link]();
}
}//method ends
public static void main()
{
NumOverload obj = new NumOverload();
Scanner sc=new Scanner([Link]);
[Link]("\nEnter the number of terms of Fibonacci series to be
printed....");
int a=[Link]();
[Link](a);
[Link]("\n"+"Enter two numbers to find the square root of the
greater....");
int b=[Link]();
int c=[Link]();
[Link](b,c);
[Link]();
}//method ends
}//class ends

[method prototypes-3,input-2,object creation-1,calling methods-1,method1-


2,method2-1,method3- 3,VDT-2]

16
_____________________________________________________________________________

17

You might also like