Create a 3 dimensional array

Assignment Help Computer Engineering
Reference no: EM13323752

Create a 3 dimensional array. The array should be initialized to zeroes. Create a program that will accept entries for ship locations. Ships will have to have the same Z value. In other words, the ships will all be horizontal. Enter a total of five ship locations. These can be between two and three element long ships. You will need to enter the ship length, starting coordinates and ending coordinates. Values of 1 will be placed in these elements. After you have entered 5 ships, then change the program to accept element positions where you are firing at the ship. If a 1 exists at the location, the print an alert showing you have struck the ship.

If all the elements occupied by the ship are hit, demonstrate by sending out 5 alerts and printing ship sunk.

 

Reference no: EM13323752

Questions Cloud

The sodium flouride solution and hydrofluoric acid solution : During an experiment, a student mixed 14.5 mL of a .5 M sodium flouride solution with 15.6 mL of a .750 M hydrofluoric acid solution. The measured pH was 3.24. Calculate the pKa.
Design a gui program that calculates a car gas millage : Design a GUI program that calculates a car's gas millage. The program's window should have text boxes that let the user enter the number of gallons of gas the car holds, and the number of miles it can be driven on a full tank.
What is the magnitude of its dipole moment : A dipole has a +5e charged particle and a -5e charged particle separated by a distance of 6 nm. What is the magnitude of its dipole moment
Explain the difference between a real wage and a nominal : How do the income and the substitution effects determine the slope of the labor supply curve?
Create a 3 dimensional array : Create a 3 dimensional array. The array should be initialized to zeroes. Create a program that will accept entries for ship locations. Ships will have to have the same Z value.
Explain what is the daily production of calcium sulfite : If the coal is burned in teh DPH power plant that uses 2300 tons of coal per day, what is the daily production of calcium sulfite, if the conversion is 98%? if 50 pounds of calcium oxide costa $13.50 how much does DPH power plant per day for CaO
Why application designed and written for intel architecture : Determine at least five advantages and five disadvantages of using bytecode or Intermediate Language (IL) in computer applications.
Calculate the new wacc : Calculate the New WACC and briefly discuss in your report if this new WACC and capital structure might signal the market and investors
What was their initial separation distance : Two charges are brought together until they are 90.0cm apart, causing the electric force between them to increase by a factor of exactly 6. What was their initial separation distance

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is involved in the project scope management

why is good project scope management so important on information technology projects.

  Explain about dynamic business model

The dynamic business model you are supposed to include in your assignment represents the entities involved in the strategic change

  Write a program that simulates the roll of two dice

Write a program that simulates the roll of two dice using the random number generators. You will call the rand () function once for each dice. Each rand() call will return a number between 1 and 6.

  What are the major problems of nrz

What are the major problems of NRZ (Non-Return to Zero) encoding/signaling? Is there any case where it's use could be acceptable? explain.

  Calculate and show the mortgage payment amount

Write down the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage. Allow th..

  Imagine 5,000 input time slots are to be switched

The time slots are refreshed every 100 microsec. What memory cycle time is needed to keep up with the data flow.

  Assembly program to find out the price of a car rental

Write down an Assembly program in order to find out the price of a car rental. The car being rented costs $45 per day and frequent renters get a $15 discount on the total bill.

  How to develop an eer model

make an EER model for the following situation using the traditional EER notation, the Visio notation or the supertypes notation.

  Determine one protocol which works at the osi layer 2

suppose you are Dave Baker, the Senior System Administrator from Minnesota Consulting Group (MCG). The company with which MCG has an ongoing contract wishes to have some basic TCP/IP concepts explained to senior decision-makers.

  What is difference between client and a server

What are the differences between client and a server. What is function of each layer in a three-layer application?

  How company x is going to expand its information system

Develop a list of actions you might conceivably take if no agreement is reached.

  How to create a coke machine program in c++

We would start by having the users insert their money. Since they can not physically insert the money, we will just ask them how much they wish to insert and we will keep track of how much money they have inserted.

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