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

  Prompt the user to enter a string

Prompt the user to enter a string, and using a loop, count and output the number of vowels, and consonants the string contains. (find methods from class Character to help you.)

  Describe how to develop users for sales organization unit

Describe how you would develop users for sales organization unit and how you can set up work groups in this particular situation.

  Discuss different reasons terminating a process and command

discuss the different reasons for terminating a process and the commands used for this purpose.

  What are the implications for companies seeking to learn

Mark Jamison of Kimberly Clark notes that it is business processes and not the technology (e.g RFID)itself, what bring value to the supply chain.What does he means by that. what are the implications for companies seeking to learn from the likes of..

  Prepare a plan for implementing hyper-v

Specify the most significant advantages and disadvantages that could be realized by the organization in adopting a server virtualization infrastructure.

  Explaining set of all regular languages is countable

Prove or disprove: the set of all regular languages is countable.

  What is server side and client side scripting

Describe and explain 5 underlying concepts that drive interaction design. Please include appropriate details and examples with applicable references in APA style.

  Discuss the points and tabulate the strengths and weakness

Please discuss the points and tabulate the strengths and weaknesses

  Write recursive method prints out the digits reverse order

Write the code for a recursive method that accepts an integer argument and prints out the digits in reverse order

  Explain local telephone calls-long distance telephone calls

Will distinction between local telephone calls and long distance telephone calls ever disappear? What may cause this to happen?

  Describing online services provided by selected companies

Identify and briefly describe the online services provided by the selected companies (e.g. online catalogue search, online information search.

  Why should a company implement a csr program

3. How does the CSR program apply to today's trends and current issues in the global marketplace? 4. Whom is the company responsible to? 5. Why should a company implement a CSR program?

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