Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q1) Consider the following class declaration and object declaration in main() class exerclass { private: int p1;int; public: exerclass (int a, int b) {p1=a; p2=b} int get,_p1() {return p1;} int get_p2 {return p2} void combine (int a) {p1=p1+p2+a} }; int main() { exerclass exl (3,4); exerclass *p=&ex1; //pointer object exerclass ex2(7,8); exerclass &ex_r =ex2; // independent object reference return 0; } what is the output in each of the above program? Work each independent of the others 1. cout <<p->get_p1(); 2. ex_p-> combine(6); cout <<p ->get_p1(); 3. cout <<ex_r.get_p2(); 4 p=&ex_r; p->combine(5); cout-> ex2.get_p1(); 5. Write a void function display_exer() that displays in a nicely formatted way the data member of an exerclass object. Pass the object to the function by value. 6. Write a void function display_exer() that display in a nicely formatted way the data members of an exerclass object. Pass the object to the function by pointer. 7. Write a void function display_exer() that display in a nicely formated way the eat members of an exerclass object. Pass the object to the function by reference.
Write a program that calculates the amount a person would earn over a period of time if his or her salary is one penny the first day.
Create an application comprised of three classes. The first class called Crayon represents one crayon of a particular color and length (height).
Add method union to interface BagInterface for ADT bag which returns as new bag the union of bag receiving call to method and bag which is the method's one argument.
User must have option to draw new shape at different location and keep the existing shape. Design all the getter and setter & constructor methods for each class.
Suppose two variables p1 and p2 of type POINT, with two fields, x and y, both of type double, have been declared. Write a statement that reads values for p1 and p2 in that order.
Program a robot to run mile-long steeplechase where steeples are made from beepers instead of wall segmesnts. the robot must jumb the steeples in this race by picking the beepers that make up the steeples.
What is the probability that line is executed during the nth iteration of the for loop? What is the exact expected number of executions of line?
Describe in one or two paragraphs what you observe. Give hypertext link of the internet location of the program (or applet) you found.
Write pseudocode for linear search by using CLRS3e style used in, which scans through the sequence, looking for v.
Manager of a Supermarket would like to be able to calculate the unit price of items sold there. To do this the program should input the name and the price of the item.
Write a hand-coded top-down recursive descent parser.
Write a program to read from an input file for 15 students, that contains each individual student ID, the course code, letter grade, and credit hours for five courses.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd