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 user defined method named getMark that can be used to get a valid mark from the user. Your method must continuously ask the user for a mark, until a valid mark is entered (valid marks are between 0 and 100). If a user enters an invalid mark, display an error message before asking for a valid mark to be entered. The method must return the valid value to the calling program.


Create a program whose Main() method prompts a user for length and width of a room in meter. Create a method that accepts the values and then computes the estimated cost of painting the room, assuming the room is rectangular and has four full walls and the walls are 2.6 meter high. The rate for the painting job is R20 per square meter. Return the estimated cost to the Main() method, and display it.


By using polymorphism, Define a class Shape having an attribute Area and a pure virtual function Calculate_Area. Also include following in this class.  A constructor that initializes Area to zero.  A method Display() that display value of member variable. Now derive two classes from Shape; Circle having attribute radius and Rectangle havingattributes Length and Breadth. Include following in each class.  A constructor that takes values of member variables as argument.  A method Display() that overrides Display() method of Shape class.  A method Calculate_Area() that calculates the area as follows: Area of Circle= PI* Radius2 Area of Rectangle=Length*Breadth Use following driver program to test above classes.


int main() { Shape *p; Circle C1(5); Rectangle R1(4,6); p=&C1; p->Calculate_Area(); p->Display(); p=&R1; p->Calculate_Area(); p->Display(); return 0; }




By using inheritance, Define a class Shape having an attribute Area and a pure virtual function Calculate_Area. Also include following in this class.  A constructor that initializes Area to zero.  A method Display() that display value of member variable. Now derive two classes from Shape; Circle having attribute radius and Rectangle havingattributes Length and Breadth. Include following in each class.  A constructor that takes values of member variables as argument.  A method Display() that overrides Display() method of Shape class.  A method Calculate_Area() that calculates the area as follows: Area of Circle= PI* Radius2 Area of Rectangle=Length*Breadth Use following driver program to test above classes.

int main() { Shape *p; Circle C1(5); Rectangle R1(4,6); p=&C1; p->Calculate_Area(); p->Display(); p=&R1; p->Calculate_Area(); p->Display(); return 0; }


There are assemblers that are capable of handling macro commands.

 Please explain in your own words what a macro command is and provide an example.

When would you program a macro and when would you program a subprogram (also called functions, subroutines, methods)?


1) Write a program in C++ that is able to determine and display the largest and the smallest number among any number of integers entered by the user.


2) Write a program in C++ that is capable of displaying how many numbers from 0 to 100 that are divisible by 2 and 5.




Alice sends a Happy Birthday greeting card to Bob email id. Bob need to click on the attachment to see the card. What should you do if the greeting mails come to your id? And list down the four big risk if Bob click on link


User A and User B want to communicate with each other They select Diffie Hellman algorithm to exchange their secret keys Let say both of them decided -3 and a-17 user A has secret number a5, whereas user B has secret number bell What will be their symmetric key after this process?


Your task is to declare a 2D array whose dimensions should be entered by the user of the program.

• Then you should initialize the array with ones (using nested loops).

• Next you have to write a function array_multiply() which takes in the array or its pointer as argument and multiplies all its entries with a user input number.

(Hint: you will also need to pass in the dimensions of the matrix to this function).

• Similarly write a function array_add() that adds a constant number to all the entries in a 2D array.

• Print the results of calling these functions. 


Input the grades of a student by taking marks in 3 different subjects using arrays. 2 points

Use functions to Design a grade calculator based on following criteria: 2 points

If the student scores 60 above in all three subjects, then he should get an A grade. 2 points

If the student scores 60 above in only one subject, he gets a B grade. 2 points

If he scores 60 below in all subjects he scores C grade.


LATEST TUTORIALS
APPROVED BY CLIENTS