Question: Assignment Requirements Create a new Java Project in your Eclipse workspace named as before, smith 7 or jones 7 for example. Create a package with
Assignment Requirements
Create a new Java Project in your Eclipse workspace named as before, smith or jones for example.
Create a package with the very same name as your project name.
In this one package, write one Java program for each exercise as required below.
Adhere to naming conventions for variables and classes as in section
Choose descriptive variable names and identifiers in all programs.
Start each program with your name and SPC ID# in a comment.
Add a few more comments in each program to explain what your code is doing.
When all programs are done, locate your project folder in your workspace.
Rightclick on the project folder folder dont open it and select "Send to "Compressed zipped folder". This will make a zip with the same name as your project.
Upload the zip to this drop box. Type your collaboration statement into the message area of the drop box.
Submit your assignment.
Exercise
Create a Java program with a method that searches an integer array for a specified integer value see help with starting the method header below If the array contains the specified integer, the method should return its index in the array. If not, the method should throw an Exception stating "Element not found in array" and end gracefully. Test the method in main with an array that you make and with user input for the "needle".
public static int returnIndexint haystack, int needle
Exercise
Write a program in a single file that:
Main:
Creates random doubles, all between and
Calls a method that writes random doubles to a text file, one number per line.
Calls a method that reads the text file and displays all the doubles and their sum accurate to two decimal places.
SAMPLE OUTPUT
The total is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
