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

  Create an array of five shippedorder objects

Prompt the user for values for each Orders object; do NOT allow duplicate order numbers and force the user to reenter the order when a duplicate order number is entered.

  What would be the last statement executed

define the output of the screen when the program executes with a value of 200.

  Determine mean salary as well as the number of salaries

Input a list of employee salaries, and determine the mean (average) salary as well as the number of salaries above and below the mean.

  What are the capabilities of odd parity

How many bits are needed to uniquely represent a code that includes.

  Write a program which reads a file and creates a file

Create your own file to test your program. Your job is to set up the input and output files to have the program read from a file and write to a file.

  Execute a recursive directory traversal

Execute a recursive directory traversal.

  What is the object-oriented software

Why is object-oriented paradigm becoming the dominant software engineering choice? Does object-oriented paradigm help to enforce the concept that information is stored in one place and needs to be updated or changed only in that place.

  Which method allow channel to synchronization sequence

Which method allow channel to synchronization sequence? Discuss the trade-offs between fibre optic and satellite communication in terms of costs, signal capacity, signalling method, interference, likelihood of failure and repair issues, multipoin..

  Determining pearson correlation coefficient

Determining the Pearson correlation coefficient you need to write down the program computing Pearson correlation coefficient utilizing the parallel loop templates from the Intel Threading Building Blocks library (TBB).

  Describe the use of web standards

What are web applications and how are they used? give two examples of web applications.

  Discuss software testing as a career path in brief

discuss software testing as a career path in brief. The techniques for solving linear equations and linear inequalities are similar, yet different. Explain and give an example of both a linear equation and a linear inequality that demonstrates this..

  How to fit a image in the main frame

how to fit a image in the main frame of uploaded file?

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