What is multilevel inheritance? Draw the diagram to show multilevel inheritance. using classes with data member and member function. 

1 Answer

Answer :

When a class is derived from another derived class then it is called as multilevel inheritance.

electronics2electrical.com 693 -  .jpg

Related questions

Description : Virtual constructor: Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error. Does c++ support multilevel and multiple inheritance?

Last Answer : Yes.

Description : Does c++ support multilevel and multiple inheritance?

Last Answer : Yes.

Description : Write a C++ program for following multilevel inheritance.   Accept and display data for one car with all details.   

Last Answer : #include<iostream.h> #include<conio.h> class Carmanufacturer  { char Name[10]; public: void getcarm() { cout<<"\nEnter Car Name "; cin>>Name; } void putcarm() ... getcar(); c.putcarm(); c.putcarmodel(); c.putcar(); getch();  }

Description : What is multiple inheritance? What is multilevel inheritance? What is difference between them?

Last Answer : Multiple Inheritance: When A derived class is derived from more than one base class then it is known as multiple inheritance. A derived class can inherit the attributes of all base classes ... , last derived class will inherit only public property of all class including intermediate class.

Description : What is inheritance? Give different types of inheritance.

Last Answer : Inheritance: The mechanism of deriving new class from an old/existing class is called inheritance. OR Inheritance is the process by which objects of one class acquired the properties of ... is a combination of single, multiple, multilevel and hierarchical inheritance. Diagram:

Description : Write a program to implement single inheritance from the following Refer Figure No.1

Last Answer : #include #include class employee { protected: int emp_id; char name[10]; }; class emp_info:public employee { int basic_salary; public: void getdata() { coutemp_id; coutname; coutbasic_salary; } void putdata() { cout

Description : Write two properties of static member function

Last Answer : i) A static member function can have access to only other static data members and functions declared in the same class. ii) A static member function can be called using the class name with a scope resolution operator instead of object name as follows: class_name::function_name;

Description : Write a program to implement the following hierarchy using suitable member functions. Refer Figure No.2.

Last Answer : # include <iostream.h> #include<conio.h> class Student { int roll_no; char name[10]; public: void read_studentData() { cout<< Enter student s roll no and name \n ; cin> ... { result r; clrscr(); r.read_result(); r.display_result(); getch(); }

Description : Write a program to declare a class ‘book’ containing data members as ‘title’, ‘author-name’, ‘publication’, ‘price’. Accept and display the information for one object using pointer to that object.

Last Answer : #include<iostream.h> #include<conio.h> class book { char author_name[20]; char title[20]; char publication[20]; float price; public: void Accept(); void Display(); }; void ... title \t author_name \t publication \t price\n ; p-> Display(); getch(); }

Description : Which of the following statements is true (A) Abstract data types are the same as classes (B) Abstract data types do not allow inheritance (C) Classes cannot inherit from the same base class (D) Object have state and behavior

Last Answer : (B) Abstract data types do not allow inheritance

Description : ______provides a powerful and natural mechanism for organizing and structuring your software. It also explains how classes inherit state and behavior from their super classes and explains how to derive one class ... the java programming language: a) Object b) Inheritance c) Class d) None of These

Last Answer : b) Inheritance

Description : Draw a neat labeled diagram to show protective system for AC traction and give the function of each relay used in it. 

Last Answer : Protective system for AC traction:  Function Of Each Relay: For transformer -  Inverse time over current relay- as back up protection on primary (HV side) over current ... against faults near substation  Under voltage relay - protection against faults far away from substation

Description : Explain the friend function with proper example.

Last Answer : Friend function: The private members of a class cannot be accessed from outside the class but in some situations two classes may need access of each other s private data. So a common function can be declared which can be made friend ... ; } friend void swap(A,B); }; void swap(A a,B b) { cout

Description : What are the rules for virtual function?

Last Answer : Rules for virtual function: 1. The virtual functions must be members of some class. 2. They cannot be static members. 3. They are accessed by using object pointers. 4. A virtual function can ... virtual function is defined in the base class, it need not be necessarily redefined in the derived class.

Description : State the rules for writing destructor function.

Last Answer : Rules for writing destructor function are: 1) A destructor is a special member function which should destroy the objects that have been created by constructor. 2) Name of destructor and name of the class should ... should not be classified in any types. 7) A class can have at most one destructor. 

Description : Give syntax and use of fclose ( ) function.

Last Answer : Syntax:  int fclose(FILE* stream); Use: This function is used to close a file stream. The data that is buffered but not written is flushed to the OS and all unread buffered data is discarded.

Description : Draw block diagram of Data Acquisition System (DAS). Write function of each block.

Last Answer : Data Acquisition System(DAS) : - (Definition) - The function of DAS is to collect the input data efficiently, accurately, simultaneously to store and display the data. It consists of sensor or transducer ... - to output od DAS is provided in the form of display or plot or recoded in recorder.

Description : Apart from the Central Level Planning, what are the other levels in the multilevel planning ? -Geography

Last Answer : 1. State-level planning. 2. District-level planning. 3. Block-level planning. 4. Panchayat level planning.

Description : What is the difference between numbered text and multilevel numbered text?

Last Answer : 1

Description : Starting a Multilevel Marketing Firm?

Last Answer : Starting a multilevel marketing firm is an excellent way to make residual income. Earn money even when you are not working, with a multilevel marketing firm. Millions of people have made money in this business, and the profits are endless. Start your own firm today and watch the money roll in.

Description : A decoder is required in case of a ______________ a) Vertical Microinstruction b) Horizontal Microinstruction c) Multilevel Microinstruction d) All types of microinstructions

Last Answer : Answer: a Explanation: There are two types of microinstructions: Horizontal and Vertical. In a horizontal microinstruction, each bit represents a signal to be activated whereas, in case ... of Computer Fundamentals Interview Questions and Answers for freshers focuses on The Decimal Number System

Description : Benetton, a leading manufacturer of knitwear, expanded its operations to include retail outlets in the United States and Europe. This type of integration is called A)horizontal. B)vertical. C)multilevel. D)retail. E)merchandising.

Last Answer : B)vertical

Description : Goods or services reach the market place through ________. A. marketing channels. B. multilevel pyramids. C. monopolies. D. multiplication.

Last Answer : 1

Description : The Simplest CPU – scheduling algorithm is ______. (1) SJF scheduling algorithm (2) Round robin scheduling algorith (3) Multilevel scheduling algorithm (4) FCFS scheduling algorithm

Last Answer : FCFS scheduling algorithm

Description : A ____ is a namespace for organizing classes and interfaces in a logical manner. Placing your code into ______makes large software projects easier to manage. This section explains why this is useful and ... provided by the Java Platform: a) Inheritance b) Object c) Package d) None of These

Last Answer : c) Package

Description : The concept of multiple inheritance is implemented in Java by A) extending two or more classes B) extending one class and implementing one or more interfaces C) implementing two or more interfaces D) both B and C

Last Answer : D) both B and C

Description : The concept of multiple inheritance is implemented in Java by A) extending two or more classes B) extending one class and implementing one or more interfaces C) implementing two or more interfaces D) both B and C

Last Answer : D) both B and C

Description : State true or false. i) init() is called after start() in applet ii) applets are used for networking iii) inheritance is a part of Java Foundation Classes iv) final does not prevent inheritance A) i-true, ii- ... C) i-true, ii-true, iii-true, iv-true D) i-true, ii-false, iii-false, iv-false

Last Answer : B) i-false, ii-false, iii-false, iv-false

Description : …………. Is the process of creating new classes, called derived classes from existing classes called base class. A) Inheritance B) Encapsulation C) Polymorphism D) Overloading

Last Answer : A) Inheritance

Description : .................. allows to create classes which are derived from other classes, so that they automatically include some of its "parent's" members, plus its own members. (A) Overloading (B) Inheritance (C) Polymorphism (D) Encapsulation 

Last Answer : (B) Inheritance

Description : List different types of inheritance with suitable diagram.

Last Answer : Types of inheritance: 1) Single inheritance: A derived class is derived from only one base class. Diagram: 2) Multiple inheritance: A derived class is derived from more ... ) Hybrid inheritance: Combination of single, multiple, multilevel and hierarchical inheritance.  Diagram:

Description : 3. Draw the ray diagram in each case to show the position and nature of the image formed when the object is placed: -Chemistry-10

Last Answer : Answer. Nature of image: Real, inverted and same size image is formed at the centre of curvature. Nature of image: Virtual, enlarged and erect image is formed behind the mirror. Nature of image: ... image: Virtual, erect and diminished image is formed between O and F on the same side of object.

Description : (a) Draw a diagram to show the nutrition in Amoeba and label the parts used for this purpose. Mention any other purpose served by this part other than nutrition. (b) Name the glands associated ... mention their role. (c) How is required pH maintained in the stomach and small intestine? -Biology

Last Answer : Answer.(a) Pseudopodia serves the purpose of locomotion apart from nutrition. (b) The salivary gland is associated with digestion of starch in human digestive tract. It secretes saliva which contains ... juice from liver makes the food alkaline in small intestine for the pancreatic enzymes to act.

Description : (a) Draw a diagram to show open stomatal pore and label on it: (i) guard cells (ii) chloroplast (b) State two functions of stomata. (c) How do guard cells regulate the opening and closing of stomatal pore? -Biology

Last Answer : (a) (b) Two functions of stomata are: (i) Exchange of gases between the plant and the atmosphere takes place through stomata. (ii)Transpiration in plants takes place through stomata. ( ... through these stomata, the plant closes these pores when it does not require carbon dioxide for photosynthesis.

Description : An object 2 cm high is placed at a distance of 64 cm from a white screen. On placing a convex lens at a distance of 32 cm from the object it is found that a distinct image of the object ... diagram to show the formation of the image in this position of the object with respect to the lens. -Physics

Last Answer : Since, object-screen distance is double of object-lens separation, the object is at a distance of 2f from the lens and the image should be of the same size of the object.

Description : Draw the ray diagram in each case to show the position and nature of the image formed when the object is placed: (i) at the centre of curvature of a concave mirror (ii) between the pole P and focus F of ... front of a convex mirror (iv) at 2F of a convex lens (v) in front of a concave lens -Physics

Last Answer : Answer. Nature of image: Real, inverted and same size image is formed at the centre of curvature. Nature of image: Virtual, enlarged and erect image is formed behind the mirror. Nature of image: Virtual ... : Virtual, erect and diminished image is formed between O and F on the same side of object.

Description : Draw a labelled diagram to show different trajectories of a satellite depending upon the tangential projection speed.

Last Answer : Draw a labelled diagram to show different trajectories of a satellite depending upon the tangential projection speed.

Description : When A game involves rolling 2 dice. draw a tree diagram to show all of the possibilities.?

Last Answer : A tree diagram for 2 dice is not a sensible approach to thequestion. You have the starting point from which there are sixprimary branches representing the six possible outcomes for thefirst die. Then, from ... draw such a tree diagram: a 6x6 table is a much better way torepresent the outcome space.

Description : Draw stress-strain diagram for mild-steel rod and show different limits on it. 

Last Answer : Where, A = Limit of proportionality B = Elastic limit C = Upper yield point D = Lower yield point E = Ultimate load point F = Breaking point

Description : Write a program that copies contents of one file into another file.

Last Answer : Assuming input file to be copied file1.txt contents are “Hello Friends…” and file where the contents need to copy is file2.txt already created  #include #include #include #include #include void main() { clrscr(); ifstream fs; ofstream ft; char ch, fname1[20], fname2[20]; cout

Description : Write a program to overload the ‘—’ unary operator to negate the values.

Last Answer : #include<iostream.h> #include<conio.h> #include<string.h> class Number { int x,y; public: Number (int a, int b) { a =x; b =y; } void display() { cout<< ... ; -N1; cout<<"\n After negation:"; N1. display (); getch (); }

Description : Write a program to count the number of lines in file.

Last Answer : #include<iostream.h> #include<fstream.h> #include<conio.h> void main() { ifstream file; char ch; int n=0; clrscr(); file.open("abc.txt"); while(file) { file. ... \n Number of lines in a file are:"<<n; file.close(); getch(); }

Description : Write a program to sort an 1-d array in ascending order.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int arr[20]; int i, j, temp,n; clrscr(); cout<<"\n Enter the array size:"; cin>>n; cout<<"\n Enter ... 0;i<n;i++) {  cout<< \n <<arr[i]; } getch(); }

Description : What is parameterized constructor?

Last Answer : A constructor that accepts parameters is called as parameterized constructor. In some applications, it may be necessary to initialize the various data members of different objects with different values when they are ... an argument. Member function put ( ) displays the value of data member m .

Description : Write the applications of object oriented programming.

Last Answer : Applications of object oriented programming are: 1) Real time systems 2) Simulation and modeling 3) Object-oriented databases 4) Hypertext, hypermedia and expertext 5) AI and expert systems ... and parallel programming 7) Decision support and office automation systems 8) CIM/CAM/CAD systems

Description : Describe ‘this’ pointer with an example.

Last Answer : this' pointer:  C++ uses a unique keyword called this to represent an object that invokes a member function. This unique pointer is automatically passed to a member function when it is invoked. ... pointer is used to represent object s when setdata ( ) and putdata ( ) functions are called. 

Description : Write any four benefits of OOP. 

Last Answer : Benefits of OOP: 1. We can eliminate redundant code and extend the use of existing classes. 2. We can build programs from the standard working modules that communicate with one another, ... interface descriptions with external systems much simpler. 10. Software complexity can be easily managed.

Description : Describe memory allocation for objects.

Last Answer : The memory space for object is allocated when they are declared and not when the class is specified. The member functions are created and placed in memory space only once when they are ... are essential because the member variables will hold different data values for different objects.

Description : Explain virtual base class with suitable example.

Last Answer : Consider a situation where all three kinds of inheritance, namely, multilevel, multiple, hierarchical inheritance, are involved. This illustrated in fig a. the child has two direct base classes, parent1 & ... Grandparent { }; class Child: public Parent1,public Parent2 { };