Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Improve the program's functionality by utilizing at least 5 of the concepts from the list below. Document how the game works, including how you utilized each of the chosen concepts and what it's role is inthe overall program.

List of Concepts
1. Vectors with iterators
2. Do or while loops
3. Operator overloading
4. Pointers/references
5. The heap(objects with 'new')
6. Destructor overloading
7. Constructor overloading
8. Copy constructor overloading
9. STL algorithms (sort, shuffle, etc..)
10. Private/protected data members/functions
11. Block scope
12. Function overloading
13. Multidimensional arrays
14. Functions, parameters, return values
// Guess my number
// The classic number guessing game
#include
#include
#include
using namespace std;
int main()
{
srand(static_cast(time(0))); //seed random number generator

int secretNumber = rand() % 100 + 1; // random number between 1 and 100
int tries = 0;
int guess;
cout << "\tWelcome to Guess My Number\n\n";
do
{
cout << "Enter a guess: ";
cin >> guess;
++tries;
if (guess > secretNumber)
{
cout << "Too high!\n\n";
}
else if (guess < secretNumber)
{
cout << "Too low!\n\n";
}
else
{
cout << "\nThat's it! You got it in " << tries << "guesses!\n";
}
} while (guess != secretNumber);
return 0;
}

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9887743

Have any Question?


Related Questions in Computer Engineering

Questions 1 for the set of 1 4 5 16 17 21 of keys draw

Questions: 1. For the set of {1, 4, 5, 16, 17, 21} of keys, draw binary search trees of heights 2, 3, 4, 5, and 6. 2. Use the Binary Search Tree class to Write the TREE-PREDECESSOR procedure. 3. Show that there are at mo ...

Need help with the following 2 problems1 they offer you a

Need help with the following 2 problems: 1. They offer you a promissory note with a four-year maturity, which will generate $ 3,000 at the end of each of the four years. Its price is $ 10,200. What is the implicit annual ...

Roberto is the network administrator for an international

Roberto is the network administrator for an international law firm with offices and customers in North America, South America, Africa, and the Middle East. The lawyers frequently contact each other via e-mail, use the In ...

Question suppose we carry out a binary search of an ordered

Question : Suppose we carry out a binary search of an ordered list of 63 items: We are searching for an item X which occurs exactly once in the list. How many comparisons are carried out i. in the worst case scenario ii. ...

What are some of the uses of bayes theorem as in what type

What are some of the uses of bayes' theorem. As in what type of problems could I come across in a Biostatistics quiz

A shipment of 15 televisions sets contains 3 defective sets

A shipment of 15 televisions sets contains 3 defective sets. A hotel purchases 9 of these televisions sets. What is the probability that the hotel receives at least one of the defective sets?

Social sitessocial media is a common marketing tool and

Social Sites Social media is a common marketing tool and most site builders offer integration with major social media sites. Discuss at least two examples of what you would promote on social media from a web site that yo ...

Meannbsp3290 milesstandard deviation ofnbsp384 mileswhat is

Mean 3290 miles Standard Deviation of 384 miles What is the probability that the mean of a sample of 33 cars would be less than 3160 miles?

Question create for your company amp conduct cyber

Question: Create for your company & conduct cyber assessment using the CSET Cybersecurity Framework (CSF) requirement-based assessment a. complete site info b. Sector & demo: i. [Select your business] ii. [Select your bu ...

Junit test labyou will be creating a junit test class for

JUnit Test Lab You will be creating a JUnit Test Class for Gradebook.java, that has been provided for you.   Add a getScoreSize() method to the Gradebook class which returns scoresSize; Add a toString() method to the Gra ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As