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

Write a C++ program using multilevel inheritance concept which will display studentinformation ( Roll number ,marks obtain in two subject, total marks) use followinginformation Class student to get and put roll number, class test to get and put marks of twosubject & test will inherit class student• Class Result to compute and display total marks

Create a base class called Shape. Use this class to store two double values that could beused to compute the area of figures. Derive three classes called as triangle, rectangle andcircle from the base Shape.Add to the base class a member function get_data() to initialize base class datamembers and another member function display_area() to compute and display the area offigures. Make display_area() as a virtual function and redefine this function in the derivedclasses to suit their requirements.Using these four classes, design a program that will accept, dimensions of a triangleand rectangle and radius of circle, and display the area.The two values given as input willbe treated as lengths of two sides in the case of rectangles and as base and height in thecase of triangles and used as follows :Area of rectangle = x * yArea of triangle = ½ * x * y

Write a C++ program using multilevel inheritance concept which will display studentinformation ( Roll number ,marks obtain in two subject, total marks) use followinginformation Class student to get and put roll number, class test to get and put marks of twosubject & test will inherit class student• Class Result to compute and display total marks

a) Write a program to illustrate the use of virtual, non-virtual functions.


Disadvantages of using microservices


Rearrange Numbers in String


Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.

Input

The input will be a single line containing a string.

Output

The output should be a single line containing the modified string with all the numbers in string re-ordered in decreasing order.

Explanation

For example, if the given string is "I am 5 years and 11 months old", the numbers are 5, 11. Your code should print the sentence after re-ordering the numbers as "I am 11 years and 5 months old".


Sample Input

I am 5 years and 11 months old


Sample Output

I am 11 years and 5 months old




Write a function that takes an array of floating point values,

An integer that tells how many floating point values are in the array. The function must reverse the order of the value in the array


Let us consider a guessing game in which the computer picks a random twodigit number in the range from 0 to 99 and asks the user to guess the number. After each guess, the computer lets the player know how many digits of guessed numbers match the correct number. If the guessed number matches the correct number, the computer lets the player know the number of guesses the player made. 

Question1:Each function should be tested as soon as it is written. To do that, write the introduction and write the main() function and call the intro function.

Question2: To test the digitMatches() function, just call only that function with different inputs by giving two numbers. The function must work for any number in the range from 0 to 99.

Question3: You test the getInt() for non-numeric input first and then the guessNumber() function for the value of the number in the correct range.


Write a program that reads words and arranges them in a paragraph so that all

other than the last one are exactly forty characters long. Add spaces between words to make

the last word extend to the margin. Distribute the spaces evenly. Use a helper function for

that purpose. A typical example would be

Four score and seven years ago our

fathers brought forth on this continent

a new nation, conceived in liberty, and

dedicated to the proposition that all

men are created equal.


7. The program should contain the following functions.

• Write a function to print the introduction to the game. The call to this function should be the first line of your main() function. This function does not take any arguments and does not return a value. The computer is a player here. It tells the user to guess a number from 0 to 99 and it will tell how many of those digits from the guess appear in its secret number.

• Write a function called by main() named digitMatches that takes two arguments, the number computer generated and the player’s guess, both of type int and returns an integer, the number of matching digits. It doesn’t display the matching digits, it just lets the player know how many digits match.


LATEST TUTORIALS
APPROVED BY CLIENTS