Question: 1. Conceptual Questions Briefly explain how Object Oriented Programming implements the concept of encapsulation and information hiding b) In general, objects have two sets of

1. Conceptual Questions

Briefly explain how Object Oriented Programming implements the concept of encapsulation and information hiding

b) In general, objects have two sets of members : attributes and methods. Explain the role these members play in designing an object.

c) What is the purpose of the constructor of a class?

d) Briefly explain the purpose of the toString method

e) What is the main difference between a static data member and non-static data member of an object. Give an example

f) When we use the Scanner class, we first create an object instance of String as shown below Scanner scan = new Scanner(System.in); However, when we use the Math class, we do not create an object instance, but use the object name Math as shown below.

Math.sqrt(20); Briefly explain this difference in usage

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!