In: Computer Science
1. when you create a class by making it inherit from another class, the new class automatically, contains the data fields and _____ of the original class
a. fonts
b. methods
c. class names
d. arrays
2. if a programming language does not support ________, the language is not considered object oriented
a. syntax
b. applets
c. loops
d. polymorphism
3. when you create a class and do not provide a ______, java automatically supplies you with a default one
a. constructor
b. argument
c. header
d. name
4. when tou employ ______, your data can be altered only by the methods you choose and only that you can control
a. virtual methods calls
b. polymorphism
c. information hiding
d. inlining
Answer:
1.Answer: Class names
Explanation:
Class contains fields and methods so when you inherit you will get both data fields and methods in child
2.Answer: polymorphism
Explanation:
Syntax, applets, loops are part of any programming language but
polymorphism i.e. method overriding and method overriding is one of
the basic concepts of object oriented language. And polymorphism
can't be done in procedural
programming
3.Answer: constructor
Explanation:
Constructor is required to initialise the object and Arguments,headers and name of the classes are not used to initialise a object and they should be set according to the given problem statement.
4.Answer: information hiding
Explanation:
Information hiding is making the data members private,and you can only access that data from the member functions only ,by this we can prevent users from manipulating internal data of an object into inconsistent state.
*******************
Please give an Upvote if you found this answer helpful
******************