Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please write it down on java and not here . Objective: In this lab we are going to practice two tasks together: 1. Using 2D

please write it down on java and not here . image text in transcribed
Objective: In this lab we are going to practice two tasks together: 1. Using 2D array 2- Reading and writing to a text file in Java . Write a java program that solves the following problem using 2-dimensional arrays and I/O to a text file: Suppose we have a bunch of triangles prism and we would like to find the volume of each one: Create two 2D arrays [2][2] that store the base (double) and height (double) Read the base (b) and the height (h) from the user then store them in the arrays Use 3 as altitude (a) for the triangle prism. Calculate the volume of the triangle prism using this formula: AV=0.5bha Store the volume in another 2D array (double) Write the base, height and volume in a text file (triangles prism.txt) Submit your code and your text file

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

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

What are the desired attributes of good board members?

Answered: 1 week ago

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago