- 797 step-by-step solutions
- Solved by professors & experts
- iOS, Android, & web

- Question : 1E - Mark the following statements as true or false. a. The life cycle of software refers to the phases from the point the software was conceived until it is retired. b. The three fundamental stages of software are development, use, and discard. c. The expression 4n + 2n 2 + 5 is O(n). d. The instance variables of a class must be of the same type. e. The function members of a class must be public. f. A class can have more than one constructor. g. A class can have more than one destructor. h. Both constructors and destructors can have parameters.
- Question : 1PE - Write a program that converts a number entered in Roman numerals to decimal form. Your program should consist of a class, say romanType. An object of romanType should do the following: a. Store the number as a Roman numeral. b. Convert and store the number into decimal form. c. Print the number as a Roman numeral or decimal number as requested by the user. (Write two separate functions
- Question : 2E - What is black-box testing?
- Question : 2PE - Write the definition of the class dayType that implements the day of the week in a program. The class dayType should store the day, such as Sunday for Sunday. The program should be able to perform the following operations on an object of type dayType: a. Set the day. b. Print the day. c. Return the day. d. Return the next day. e. Return the previous day. f. Calculate and return the day by adding certain days to the current day. For example, if the current day is Monday and we add 4 days, the day to be returned is Friday. Similarly, if today is Tuesday and we add 13 days, the day to be returned is Monday. g. Add the appropriate constructors.
- Question : 3E - What is white-box testing?
- Question : 3PE - Write the definitions of the functions to implement the operations for the class dayType as defined in Programming Exercise 2. Also, write a program to test various operations on this class.
- Question : 4E - Consider the following function prototype, which returns the square root of a real number: double sqrt(double x); What should be the pre- and postconditions for this function?
- Question : 4PE - Example 1-12 defined a class personType to store the name of a person. The member functions that we included merely print the name and set the name of a person. Redefine the class personType so that, in addition to what the existing class does, you also can do the following: a. Set the first name only. b. Set the last name only. c. Store and set the middle name. d. Check whether a given first name is the same as the first name of this person. e. Check whether a given last name is the same as the last name of this person. Write the definitions of the member functions to implement the operations for this class. Also, write a program to test various operations on this class.
- Question : 5E - Each of the following expressions represents the number of operations for certain algorithms. What is the order of each of these expressions? a. n 2 + 6n + 4 b. 5n 3 + 2n + 8 c. (n 2 + 1) (3n + 5) d. 5(6n + 4) e. n + 2log2n
- Question : 5PE - The function sellProduct of the Fruit Juice Machine programming example gives the user only two chances to enter enough money to buy the product. Rewrite the definition of the function sellProduct so that it keeps prompting the user to enter more money as long as the user has not entered enough money to buy the product. Also, write a program to test your function.
- Question : 6E - . Consider the following function: void funcExercise6(int x, int y) { int z; z = x + y; x = y; y = z; z = x; cout << "x = " << x << ", y = " << y << ", z = " << z << endl; } Find the exact number of operations executed by the function funcExercise6.
- Question : 6PE - The equation of a line in standard form is ax + by
- Question : 7E - Consider the following function: int funcExercise7(int list[], int size) { int sum = 0; for (int index = 0; index < size; index++) sum = sum + list[index]; return sum; a. Find the number of operations executed by the function funcExercise7 if the value of size is 10. b. Find the number of operations executed by the function funcExercise7 if the value of size is n. c. What is the order of the function funcExercise7?
- Question : 7PE - (Tic-Tac-Toe) Write a program that allows two players to play the tic-tactoe game. Your program must contain the class ticTacToe to implement a ticTacToe object. Include a 3 by 3 two-dimensional array, as a private instance variable, to create the board. If needed, include additional member variables. Some of the operations on a ticTacToe object are printing the current board, getting a move, checking if a move is valid, and determining the winner after each move. Add additional operations as needed.
- Question : 8E - Consider the following function prototype: int funcExercise8(int x); The function funcExercise8 returns the value as follows: If 0 <
- Question : 9E - Write a function that uses a loop to find the sum of the squares of all integers between 1 and n. What is the order of your function?
- Question : 10E - Characterize the following algorithm in terms of Big-O notation. Also find the exact number of additions executed by the loop. (Assume that all variables are properly declared.) for (int i = 1; i <= n; i++) sum = sum + i * (i + 1);
- Question : 11E - Characterize the following algorithm in terms of Big-O notation. Also find the exact number of additions, subtractions, and multiplications executed by the loop. (Assume that all variables are properly declared.) for (int i = 5; i <= 2 * n; i++) cout << 2 * n + i - 1 << endl;
- Question : 12E - Characterize the following algorithm in terms of Big-O notation. for (int i = 1; i <= 2 * n; i++) for (int j = 1; j <= n; j++) cout << 2 * i + j; cout << endl;
- Question : 13E - Characterize the following algorithm in terms of Big-O notation. for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) for (int k = 1; k <= n; k++) cout << i + j + k;
- Question : 14E - Find the syntax errors in the definitions of the following classes: a. class AA { public: void print(); int sum(); AA(); int AA(int, int); private: int x; int y; }; b. class BB { int one ; int two; public: bool equal(); print(); BB(int, int); } c. class CC { public; void set(int, int); void print(); CC(); CC(int, int); bool CC(int, int); private: int u; int v; };
- Question : 15E - Consider the following declarations: class xClass { public: void func(); void print() const; xClass (); xClass (int, double); private: int u; double w; }; xClass x; a. How many members does class xClass have? b. How many private members does class xClass have? c. How many constructors does class xClass have? d. Write the definition of the member function func so that u is set to 10 and w is set to 15.3. e. Write the definition of the member function print that prints the contents of u and w. f. Write the definition of the default constructor of the class xClass so that the private data members are initialized to 0. g. Write a C++ statement that prints the values of the data members of the object x. h. Write a C++ statement that declares an object t of the type xClass, and initializes the data members of t to 20 and 35.0, respectively
- Question : 16E - Consider the definition of the following class: class CC { public: CC(); //Line 1 CC(int); //Line 2 CC(int, int); //Line 3 CC(double, int); //Line 4 . . . private: int u; double v; }; a. Give the line number containing the constructor that is executed in each of the following declarations: i. CC one; ii. CC two(5, 6); iii. CC three(3.5, 8); b. Write the definition of the constructor in Line 1 so that the private data members are initialized to 0. c. Write the definition of the constructor in Line 2 so that the private data member u is initialized according to the value of the parameter, and the private data member v is initialized to 0. d. Write the definition of the constructors in Lines 3 and 4 so that the private data members are initialized according to the values of the parameters.
- Question : 17E - Given the definition of the class clockType with constructors (as described in this chapter), what is the output of the following C++ code?
- Question : 18E - Write the definition of a class that has the following properties: a. The name of the class is secretType. b. The class secretType has four instance variables: name of type string, age and weight of type int, and height of type double. c. The class secretType has the following member functions: print
- Question : 19E - Assume the definition of the class personType as given in this chapter. a. Write a C++ statement that declares student to be a personType object, and initialize its first name to "Buddy" and last name to "Arora". b. Write a C++ statement that outputs the data stored in the object student. c. Write C++ statements that change the first name of student to "Susan" and the last name to "Miller".

5out of 5FNData Structures using C++ Data Structures using C++ Solutions Manual is an exceptional book where all textbook solutions are in one book. It is very helpful. Thank you so much crazy for study for your amazing services.

5out of 5Anshul AroraI have read their books earlier and this new edition Data Structures using C++ Data Structures using C++ Solutions Manual helped me in providing textbook solutions. I prefer to avail their services always as they are consistent with their quality.

5out of 5SidI have read their books earlier and this new edition Data Structures using C++ Data Structures using C++ Solutions Manual helped me in providing textbook solutions. I prefer to avail their services always as they are consistent with their quality.

5out of 5FgjkkbyfhbqData Structures using C++ 2nd Edition Solutions Manual is an exceptional book where all textbook solutions are in one book. It is very helpful. Thank you so much crazy for study for your amazing services.

5out of 5Cynthia E PaganData Structures using C++ 2nd Edition Solutions Manual is an exceptional book where all textbook solutions are in one book. It is very helpful. Thank you so much crazy for study for your amazing services.