Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please make the program useable in Visual Studio 1. Your program must use one or more C++ classes. Classes can have functions. However, outside a

image text in transcribedPlease make the program useable in Visual Studio

1. Your program must use one or more C++ classes. Classes can have functions. However, outside a class only the main function may be created. All variables must be local. Any C++ classes you create must not have any public data members. You may not use the rand() function to create your program. You may use uniform_int_distribution, however. Create a game using C++ object-oriented programming. The game is played as follows. The player throws two discs on a two-dimensional grid. The grid is 10 by 10. The player wins if the discs overlap. The discs must be thrown randomly. Assume when a disc is thrown, its center is always on integer coordinates. For example, a center may be at (2, 4), where 2 is the x-coordinate and 4 is the y-coordinate. Your program prompts the user to specify the radius of the first disc and then the radius of the second disc. The discs are represented by objects. Then your program prompts the user to throw the discs. Finally, the program displays the radii of the two discs, their center coordinates, and whether the user won the game or not

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

Derive expressions for the rates of forward and reverse reactions?

Answered: 1 week ago

Question

Write an expression for half-life and explain it with a diagram.

Answered: 1 week ago

Question

What do you mean by underwriting of shares ?

Answered: 1 week ago

Question

Define "Rights Issue".

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago