Tell The User Which Boat Was Hit And Designate The Hit For That Boat In The Grid. (3a) Test Whether The Boat Was Sunk (all Positions Have Been Hit); I Homework Help & Answers - Studypool

Fast Reliable Tell The User Which Boat Was Hit And Designate The Hit For That Boat In The Grid. (3a) Test Whether The Boat Was Sunk (all Positions Have Been Hit); I Answers.

Questions, Assignments & Papers. Get Answers from Premium Tutors.

Register Free Account

Studypool, a California Company

timer
Speed

Receive help quickly. Choose your own delivery time.

lock
Privacy

Make questions 100% private & anonymous.

grade
Quality

Get quality help from verified tutors.

  NOTEBANK

Tutors can help with everything ...


  • Questions
    Physics
    Chemistry
    Mathematics


    and more...

  • Homework Assignments
    Discussion Questions
    Lab Reports
    Problem Sets


    and more...

  • Concepts
    Integrals
    Kinematics
    Game Theory


    and more...

  • Papers
    Thesis Statements
    Proofreading
    Outlines


    and more...

  • Study guides
    Cheatsheets
    Summaries
    Practice Quizzes


    and more...

  • & anything else ...
    Graphic Design
    Logo Design
    Translation


    and more...

TOP TELL THE USER WHICH BOAT WAS HIT AND DESIGNATE THE HIT FOR THAT BOAT IN THE GRID. (3A) TEST WHETHER THE BOAT WAS SUNK (ALL POSITIONS HAVE BEEN HIT); I QUESTIONS

visibility_off Private questions are not visible.

SIMILAR TAGS

Program 5: Battleship: This program is a one-player version which enables a user to play Battleship with the computer; it will be written as a class g the class examined some of the algorithm steps needed. Initial Set-up: the computer needs a 10 by 10 “ocean” grid storing where its boats are found. E or the computer could read in data for its ocean grid. User communication: Software should be user-friendly. The user refers to a grid square using a March 30 and a column index from 0 to 9. We will write a function maybe void location(char ch int num int& row int& col) which will convert user input to the needed array index values. Before the user inputs a shot (fires a torpedo) the user sees the 10x10 ocean grid with each square showing either ocean a missed shot or a previous hit. The hit square tells which type of ship (1-boat 2-boat 3- boat 4-boat or 5-boat) was hit there. The primary loop: (1) User inputs grid square where torpedo is sent. Increment number of shots. (2) Hit or miss: If it is a tell the user and designate the miss in the grid. (3) If it is a hit report it sunk and (3b) test for Game Over (all boats sunk). Repeat the loop until done; report the number of shots made by the user. Design decision: Grid Array – A the class decided to use the following data structures for the project. There will be two parallel arrays for the 10x10 ocean grids: (1) The computer’ the code for “ocean”. The 1-boat position will be an element with the integer 1 in it; the 2-boat position will be two adjacent elements with a 2 in t

# STUDYPOOL