Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Eclipse Java arrays Objective: To have some fun with arrays! What to do: Youre going to be making three JAVA classes. They are no related

Eclipse Java arrays Objective: To have some fun with arrays! What to do: Youre going to be making three JAVA classes. They are no related to each other, so you can turn them in as three separate text documents.

Program 1: MakeArrayLoop.java This program takes a number from the user (which ever method you would like to use) and then creates an array of 50 elements with the first element (element at index 0) being the number given by the usereach element after that will be the number + 1. For example, if the user enters 3 the program creates an array and assigns the values 3,4,5,6,7,8,9,10,11,etc in the array

Program 2: CommandLine.java This program takes command line arguments. The arguments are three words. Your program must output something similar to below: Command line arguments: Hello to you Console output: First word: Hello Second word: to Third word: you This must work for any three words Program 3: Sort Start with an array that has these numbers in this order (you can hardcode this into your program 1,4,2,65,3,21,17 Pick a sorting algorithm and program it!

After you finish above

Objective: To get comfortable with Exceptions What to do: Youre going to be modifying your code (all three files) from your array lab to include try catch blocks in each file. You must catch at least three types of exceptions total and each file needs to have code to catch exceptions in it.

Below is the specification from the lab Program 1: MakeArrayLoop.java This program takes a number from the user (which ever method you would like to use) and then creates an array of 50 elements with the first element (element at index 0) being the number given by the usereach element after that will be the number + 1.For example, if the user enters 3 the program creates an array and assigns the values 3,4,5,6,7,8,9,10,11,etc

in the array Program 2: CommandLine.java This program takes command line arguments. The arguments are three words. Your program must output something similar to below: Command line arguments: Hello to you Console output: First word: Hello Second word: to Third word: you This must work for any three words

Program 3: Sort Start with an array that has these numbers in this order (you can hardcode this into your program 1,4,2,65,3,21,17 Pick a sorting algorithm and program it!

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_2

Step: 3

blur-text-image_step3

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

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

ISBN: 0764549634, 9780764549632

Students also viewed these Databases questions