Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need to create a BattleShip Game in C++ on a 10x10 grid. Use classes to implement the game. It needs to be human vs computer.

Need to create a BattleShip Game in C++ on a 10x10 grid. Use classes to implement the game. It needs to be human vs computer. The Computer must read in these .csv files to input their ships. input4_good.csv Carrier,B2,H Battleship,D4,V Cruiser,G4,H Submarine,G5,V Destroyer,G8,H input5_good.csv Carrier,J1,V Battleship,D4,V Cruiser,A4,H Submarine,A9,H Destroyer,A1,H input6_good.csv Carrier,A1,H Battleship,F1,H Cruiser,E2,V Submarine,E5,V Destroyer,E8,V input7_good.csv Carrier,A1,V Battleship,A6,V Cruiser,J1,V Submarine,J4,V Destroyer,J7,V input8_good.csv Carrier,B2,V Battleship,C2,V Cruiser,D2,V Submarine,E2,V Destroyer,F2,V input9_good.csv Carrier,E6,H Battleship,E7,H Cruiser,E8,H Submarine,E9,H Destroyer,E10,H input10_good.csv Carrier,C1,H Battleship,C2,V Cruiser,D5,H Submarine,F2,V Destroyer,G2,V input11_good.csv Carrier,C6,V Battleship,D6,H Cruiser,G7,V Submarine,D10,H Destroyer,E7,V input12_bad.csv Carrier,B2,H Battleship,B3,V Cruiser,G4,H Submarine,G5,V Destroyer,G8,H input13_bad.csv Carrier,J1,H Battleship,D4,V Cruiser,A4,H Submarine,A9,H Destroyer,A1,H Ship Type Aircraft carrier-occupies 5 spaces Battleship-occupies 4 spaces Submarine-occupies 3 spaces Destroyer-occupies 3 spaces Cruiser-occupies 2 spaces. If its a hit mark with '0'. If a miss mark with 'X'. You will need to prompt for and allow for the user to input their next guess in the form of a letter (A-J) and number (1-10) indicating where they are targeting and should error check the input. The player should continue to play until all ships are sunk or if the player wants to quit the game by pressing 'Q'.. At the end of the game you should indicate the game is over and who is winner. If the player decides to quit, the grid with all of their guesses and locations of the computers ships should be displayed. Must use inheritance in one of the classes.

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

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions

Question

=+Are they specific or general in nature?

Answered: 1 week ago

Question

=+ What is the nature of the contracts or agreements with unions?

Answered: 1 week ago

Question

=+What is the procedure for labor relations in the workplace?

Answered: 1 week ago