Question

In unit 5 we introduce some of the most important concepts in object oriented programming including class, object, method, attributes, and instantiation. Discuss each of these concepts and how they re...

In unit 5 we introduce some of the most important concepts in object oriented programming including class, object, method, attributes, and instantiation. Discuss each of these concepts and how they relate to each other and provide a practical example drawn from your own personal experience.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Class:

It is a template definition of variables, methods inside an object.

Object:

It is a instance of a class. it has real values for the variables and methods.

Methods:

This are also called a functions. it is a set of repeated actions that will be performed whenever a method or function is called.

Attributes:

Variables are also known as attributes or fields or properties of the object and the class.

Instantiation:

Instantiation is the realization of the predefined object.

Instance of an class is created with specific name and used inside the program this process is called instantiation.

Examples:

// Below is an example of a class

Class Dog

{

// Attributes of the class

String name;

string color;

//Method or function

void bark()

{

}

void sleeping()

{

}

}

To get use of the class an instantiation of the class is required it is done by creating an object of the class

Dog dg=new Dog();

Please rate it if the above solution helps you in any way or if you have any concerns comment it, I will help you through again.

Add a comment
Know the answer?
Add Answer to:
In unit 5 we introduce some of the most important concepts in object oriented programming including class, object, method, attributes, and instantiation. Discuss each of these concepts and how they re...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT