Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Question 1: Write a program that defines an outline class with a constructor that gives value to breadth and altitude. The define three sub-classes square, triangle, and rectangle, that calculate the area of an outline (). In the main, define three variables a square, a triangle and a rectangle and then call the outline () function in these three variables.


(Pointers to derived classes) Write

a program to illustrate how pointers to a base class is used for both base and

derived class.


Make a program that will input type of network provider. A- for Smart and Display "SMART USER, enjoy 8.00 pesos per minute call". B- for Globe Display "GLOBE USER, enjoy 8.50 per minute call" and C-for Sun Display "SUN USER, enjoy 8.75 per minute call". Your program will be terminated when you input Z.

Write a program for Linked-list implementation of a complete binary tree. The program must


have the following functionalities.


a) Insert(): inserts a new ITEM to the complete binary tree. The items are of integer type.


b) Height(): returns height of a node recursively. Height (N) = MAX(Height(L), Height(R))


+ 1. Here, L and R respectively represent the Left child and Right child of node N. Height


of a leaf node is 0.


c) Preorder(): returns the preorder traversal sequence of the binary tree. Use recursive


implementation.


d) Postorder(): returns the postorder traversal sequence of the binary tree. Use recursive


implementation.

Modify the program by creating an array of n objects using

pointers. Show the details of n items by using pointers to object concept.


(Pointers to objects)

Define a class 'Item' that is used to store and display the information regarding the item

number and its price. Write a program to store and display the details of one

items by using both normal object and pointer to object separately. Display

appropriate message wherever necessary.


Write a program for:

Searching a word present in a sentence or not, if present print its location with a successful note.


Write a program to implement the Merge sort algorithm with the space optimization for


auxiliary space O(n/2).

Using while or do while. An ordinary colored printer can print 12 pages per minute. Make a program that will input number of pages, and compute the time to complete the print out. Consider the minutes and hour of your display. Your program will terminate if you input zero in the number of pages.

(minutes =no.pages /12) Ex: Input pages : 720

Minutes = 60 Hour= 1


(Pointers to derived classes) Write a program to illustrate how pointers to a base class is used for both base and derived class.


LATEST TUTORIALS
APPROVED BY CLIENTS