हिंदी

Rupa Pandit solutions for कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई chapter 4 - Constructors [Latest edition]

Advertisements

Chapters

Rupa Pandit solutions for कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई chapter 4 - Constructors - Shaalaa.com
Advertisements

Solutions for Chapter 4: Constructors

Below listed, you can find solutions for Chapter 4 of CISCE Rupa Pandit for कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई.


Exercises
Exercises [Pages 114 - 116]

Rupa Pandit solutions for कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई 4 Constructors Exercises [Pages 114 - 116]

Choose the correct option.

1. (i)Page 114

A constructor gets activated when ______.

  • it is invoked

  • an object of the class is created

  • the program is compiled

  • never

1. (ii)Page 114

The return type of a constructor is:

  • none

  • void

  • int

  • double

1. (iii)Page 114

The name of a constructor is:

  • same as the class name

  • different from the class name

  • supposed to be a keyword

  • must be written in uppercase

1. (iv)Page 114

Multiple constructors with different set of parameters are called:

  • multiple constructors

  • formal constructors

  • actual constructors

  • overloaded constructors

1. (v)Page 114

When a program does not contain any constructor, Java compiler provides:

  • a Null constructor

  • an overloaded constructor

  • a default constructor

  • a parameterized constructor

Fill in the blanks.

2. (i)Page 115

A constructor has the ______ (same/different) name as that of the class.

2. (ii)Page 115

A constructor ______ (does/doesn't) have any return type.

2. (iii)Page 115

A constructor ______ (can/cannot) be called as other functions.

2. (iv)Page 115

A constructor has ______ return type. 

2. (v)Page 115

When a program does not contain any constructor, java compiler provides a ______ (default/parameterized) constructor.

3. (i) aPage 115

What is a constructor?

3. (i) bPage 115

State two features of a constructor.

3. (ii)Page 115

Answer the following in brief. Give a program code example wherever applicable.

What is the use of a default constructor?

3. (iii)Page 115

Answer the following in brief. Give a program code example wherever applicable.

What is a parameterised constructor?

3. (iv)Page 115

Answer the following in brief. Give a program code example wherever applicable.

Can constructors be overloaded?

3. (v)Page 115

Answer the following in brief. Give a program code example wherever applicable.

Constructors cannot be called. Then when do they get executed?

3. (vi)Page 115

State the difference between constructor and method. 

4. (a)Page 115

Write a program for the following.

Define a class Store, described as below:

Data Members: income (double), expenditure (double), net (double)
Member Methods:
(i) Store() constructor to initialize member data to null.
(ii) Input() to input values for member data income and expenditure.
(iii) Procedure() to calculate value of net using the following formula net = income - expenditure.
(iv) Display() to display all the member data.
Write a main() method to create an object of the class and call the above member methods.
4. (b)Page 115

Write a program for the following.

Define a class Numeral, described as below:

Data Members:
num (int)
Member Methods:
(i) Numeral() constructor to initialize member data to null.
(ii) Numeral() to accept a value for the member data from the user.
(iii) Numeral() to calculate and return the value of summation of num where-
(Summation of num) = 1+2+3+ ... + num
(iv) int SumDigit() to calculate and return the sum of the digits of num.
(v) Display() To display the member data and also to invoke member methods Summation() and SumDigit() and print their return values.
Write a main() method to create an object of the class and call the above member methods.
4. (c)Page 116

Write a program for the following.

Define a class Annual, described as below:

Data Members:
costPrice (int), sellPrice (int), profit (int), profitPct (double)
Member Methods:
(i) Annual(int cp, int sp) constructor to initialize member data CostPrice to cp and SellPrice to sp and rest to null.
(ii) Calculate() to calculate the profit and profitPct using the formula profit = sellPrice - costPrice and
(iii) Display() to display all the member data.
Write a main() method to create an object of the class and call the above member methods.
4. (d)Page 116

Write a program for the following.

Define a class Mortgage, described as below:

Data Members:
loan (int), time (double), rate (double), interest (double), repay (double)
Member Methods:
(i) Mortgage(int p, constructor to initialize member data - loan to p, double r, double t) rate to r, time to t and rest to null.
(ii) Estimate() to calculate the Interest using the formula interest = (loan * rate * time )/100 and also to calculate Amount to Repay using the formula repay = loan + interest.
(iii) Display() to display all the member data.
Write a main() method to create and object of the class and call the above member methods.

Activity:

1.Page 116

Constructors can be applied to all the programs that contain member data. Upgrade the programs done till now, so as to include constructors in them.

Solutions for 4: Constructors

Exercises
Rupa Pandit solutions for कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई chapter 4 - Constructors - Shaalaa.com

Rupa Pandit solutions for कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई chapter 4 - Constructors

Shaalaa.com has the CISCE Mathematics कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई CISCE solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. Rupa Pandit solutions for Mathematics कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई CISCE 4 (Constructors) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.

Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. Rupa Pandit textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.

Concepts covered in कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई chapter 4 Constructors are .

Using Rupa Pandit कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई solutions Constructors exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in Rupa Pandit Solutions are essential questions that can be asked in the final exam. Maximum CISCE कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई students prefer Rupa Pandit Textbook Solutions to score more in exams.

Get the free view of Chapter 4, Constructors कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई additional questions for Mathematics कंप्युटर एपलीकेशंस [अंग्रेजी] कक्षा १० आईसीएसई CISCE, and you can use Shaalaa.com to keep it handy for your exam preparation.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×