Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
Define a class named GroceryItem. Include private fields that hold an item's stock number, price, quantity in stock, and total value.
Define a class named CoffeeOrder. Include private integer fields that you set to a flag value of 1 or 0 to indicate whether the order should have any
Create a program that asks the user for two integers and a character, 'A', 'S', or 'M'. Call one of three functions that adds, substracts, or multiplies
Write a C++ program that declares an array alpha of 50 components of the type double. Initialize the array so that the first 25 components are equal
Write a program that reads a student's name together with his or her test scores. The program should then compute the average test scores
How many parameters does the function test have? What is the type of the function test?
Consider the following statements: Consider the following statements:
It is not necessary to name your formal and corresponding actual parameters the same. What are the benefits of doing so?
Discuss why naming conventions are important and why programmers should consistently follow them. Include in this discussion problems that could arise in naming
What is the final value of x after executing the following code:
Convert this pseudocode into a C++ program. Note the restrictions on x and y: x can be any kind of float (including negatives)
Write a program that converts a number from Roman numerals to decimal. It needs to consist of a class, romanType
The C++ libraries on strings have several functions that can be used to handle various string operation
You must check and correct the problem. When the program is ran it is supposed to look like this on the screen.
You should check and correct answer to problem. The computer screen should look like this when the program is run.
Consider two classes: Foo and Bar, where Foo is a sender, and Bar the receiver. Foo allocates
Write two function in C++ with using arrays to find largest and smallest number. For example you have 1,43,42,9,8,5. You need arrange them smallest to highest
Create a program that allows the user to enter the last names of five candidates in a local election and the votes received by each candidate.
Suppose that vecList is a vector container and vecList = {12, 16, 8, 23, 40, 6, 18, 9, 75} Show vecList after the following statement executes:
Write a statement that declares and stores the elements of the following array into a vector object:
Explain the difference between a shallow copy and a deep copy of data.
Let us say that ip is a pointer pointing to an item in an integer array. Which of the following expressions point to the valid items within the array?
Write a statement that shows the declaration in the class strange to overload the operator >>.