Reference no: EM13283324
Write a program to play a game in which you try to sink a fleet of five navy vessels by guessing their locations on a grid. The program uses random numbers to position its ships on a 15 X 15 grid. The ships are of different lengths as follows:
Frigate: 2 locations q Tender: 2 locationsq Destroyer: 3 locations,Cruiser: 3 locationsq Carrier: 4 locations
The program must pick one square as the starting location, then pick the direction of the ship on the board and mark off the number of squares in that direction to represent the size of the ship. It must not allow a ship to overlap with another ship, or to run off the board.
The user enters coordinates in the range of 1 though 15 for the rows and A though 0 for the columns. The program checks this location, and reports whether it is a hit or a miss. If it is a hit, the program also checks whether the ship has been hit in every location that it occupies. If so, the ship is reported as sunk, and the program identifies which ship it is.
The user gets 60 shots to attempt to sink the fleet. If the user sinks all of the ships before using all 60 shots, then he or she wins the game. At the end of the game, the program should output the grid, so that the user can see where the shops are located.
Use the internet to investigate the leadership style
: Choose the CEO of one of the following organizations for this assignment: Google, Zappos, Southwest Airlines, Hewlett Packard, Xerox, W.L. Gore, DuPont, or Procter & Gamble. Use the Internet to investigate the leadership style and effectivenes..
|
Identify the optimal assignments and compute total minimum
: Which salesperson should be assigned to each region to minimize total time? Identify the optimal assignments and compute total minimum time.
|
Differences in normal aging-primary aging-seconday aging
: Describe the key differences between normal aging, primary aging, and secondary aging. What control do we have over each of these processes, and how are they influenced by internal changes, external changes, and daily life exposures? Reflect on the..
|
Build an organizational strategic plan
: Strategic planning and the tradtional steps to build an organizational strategic plan
|
Navy vessels by guessing their locations on a grid
: Write a program to play a game in which you try to sink a fleet of five navy vessels by guessing their locations on a grid. The program uses random numbers to position its ships on a 15 X 15 grid.
|
Deal-closing techniques
: NOW THAT SHE HAD TO, JEAN M C GUIRE WASN'T sure she could. Not that she didn't understand what to do. Wright Boazman, sales director for Sunrise Land Developers, had made the step clear enough when he described a variety of effective "deal..
|
Write the class definition for a class named employee
: Write the class definition for a class named Employee. The class should include data members for an employee object%u2019s name and salary. (The salary will be an integer). The class should contain two member functions: the constructor and a function..
|
Briefly discuss the issues around the use of repos
: Briefly discuss the issues around the use of (and reliance on) repos by banks.
|
Hospitals and health systems
: Debate the need for hospitals from the perspective in the early 1900s and in the 21st century. You are a health care professional looking to serve your community and you decided to open a hospital with a couple of individuals who want to provide this..
|