Document how the game works

Assignment Help Basic Computer Science
Reference no: EM13308425

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 <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
srand(static_cast<unsigned int>(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;
}

Reference no: EM13308425

Questions Cloud

Generate a histogram for all the grades : Generate a histogram for all the grades. Each score represents one dot on the histogram.
What is the boiling point of water at an elevation of 2000m : the boiling point of water decreases wiht elevation because of the pressure change. what is the boiling point of water at an elevation of 2000m and at an elevation 4000 m for standard atmospheric conditions
Explain the connection between i, s : 1) If the desired level of investment spending (I) is greater than the level of national savings (S), are net exports (NX) positive, negative, or zero? Explain the connection between I, S, and NX (in words as well as mathematically).
What torque does friction exert : A 720 gram grinding wheel 30.0cm in diameter is in the shape of a uniform solid disk. What torque does friction exert while this wheel is slowing down
Document how the game works : 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.
Explain what advantages does mpls offer : Conduct research on traffic engineering using MPLS. List a set of goals for traffic engineering. Which of these goals can only be met with MPLS, and which are met by using existing (non-MPLS) protocols. What advantages does MPLS offer
Ocial enterprises in global supply chains or in new busines : The research question(s) for the study may depend on the student's interest in social business, in social enterprises
Determine what should the size of the gap at b be : The bar AB has an axial rigidity of EA. The bar is rigidly attached at A while there is a gap at B. A load P acts at point C and has a large enough magnitude to close the gap at B.
Use eulers method : Use Euler's Method with (a) h=.5, (b) h=.25, and (c) h=.05 to solve dy/dx=yx^3-2.3y over the interval from x=0 to 2, where y(0)=1.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

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!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd