answersLogoWhite

0


Best Answer

The attributes that are common to all circles are a centre point and a radius. However, a circle is a shape thus it should also encapsulate attributes or interfaces that are common to all shapes, such as width(), height(), draw(), move(), fill(), outline() and so on. Thus it makes sense for your circle class to inherit from a common generic base class such as shape, where shape provides a common, pure-virtual interface and encapsulates attributes that are common to all shapes, such as line-width, line-colour and fill-colour.

Ultimately there is no single object model for a circle -- the implementation and encapsulation are entirely dependant upon your needs and the level of functionality you require. If your requirements are different for every application then you might want to separate all the interfaces over several classes and only include what you actually need using multiple inheritance. Thus you can have simple circles which use the minimum memory, as well as more specialised circles which contain more specific functionality.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which members of the circle class are encapsulated?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you achieve encapsulation by using class?

By making fields private. That way, they can't be directly accessed from the outside - the are hidden, that is, encapsulated.


What is a encapsulated liver tumor?

benign tumours are encapsulated


Can a parent class access the functions of child class?

no, Parent class can not access the members of child class ,but child class can access members of parent class


Is it true that a derived class inherits all the members of its base class?

False. A derived class inherits the public and protected members of its base class. Private members of the base class cannot be inherited.


AQWorlds is Protosartorium class for members?

Yes, the Protosartorium class is for members only.


What is encapsulated pneumonia?

Pneumonia caused by an infection with an encapsulated bacteria.


What were the names of Circle members at Maurice Barbenells circle?

Who were the participants at the trance circle of Maurice Barbanell


How does a class in c plus plus enforce data encapsulation?

Data encapsulation is enforced by restricting access to the class members. Access can be specified on a per-member basis, defaulting to private access for a class and public access for a struct. Private members are accessible to class members and to friends of the class. Protected members are the same as private members but are also accessible to derived class members. Public members are fully-accessible. Data members are typically declared private while interfaces are typically declared public or protected.


What is affirmed by the class is affirmed by the members of the class?

appicability


What is public private protected variable function?

The public, protected and private keywords only apply to object oriented programming languages. They are used to determine the accessibility of specific class members and their bases. Private members are only accessible to the class and to friends of the class. Protected members are the same as private but are also accessible to derivatives of the class. Public members are accessible to all code. When applied to base classes, the public, protected and private keywords can be used to either maintain or reduce the accessibility of the base class members (but never to increase their accessibility). When declared public, the accessibility of the base class members remains as defined by the base class. When declared protected, the public members become protected members. And when declared private, all members of the base class become private members. As well as defining the overall accessibility of the base class members, the accessibility of individual base class members can also be specified.


What Sharks and rays are examples of what kind of fishes members of the class Chondrichthyes?

They are members of cartilaginous class of fish.


Are sharks and rays examples of what kind of fishes members of the class Chondrichthyes?

They are members of cartilaginous class of fish.