Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment uses eclipse Assignment 5 To create a program that uses an array: Creating and Populating an Array In this section, you will create

This assignment uses eclipseimage text in transcribed

Assignment 5 To create a program that uses an array: Creating and Populating an Array In this section, you will create a small array step by step to see how arrays are used. The array will hold salaries for four categories of employees 1. create a ava class called DemoArrayY 2. Add the fomwing main() headers and their corresponding opening curly braces: public class DemoArray public static void main(Stringl] args) 3. On a new line, declare and create an array that can ho ld four doub valuesby typing the following: doublet] salary-new double[4]: 4. One by one, assign four values to the four salary array elements by typing the following: salary[0]6.25: salaryl1]6.55: salary[2]-10.25: salary[3116.85: 5. To confirm that the four values have been assigned, display the salaries one by one using the following code: System.out.println "Salaries one by one are:") System.out.println(salary [0]) System.out.println(salary[1]) System.out.println(salary[2]) System.out.printlnisalary[3]): 6. Add the tuo closing curly braces that end the main) method and the DemoArray class. 7. Run the program. Submit your code and the output as a Notepad attachment 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

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions