program in java that copies elements from one source integer array of arbitrary size to another target

computer science

Description

1. Write a program in java that copies elements from one source integer array of arbitrary size to another target array with twice the size. Use a method call that takes the two integer arrays as arguments. e.g., void copyArrays(int source[], int target[]). Demonstrate that your program works by printing to the console a sample source array and the final target array. Call the primary source file CopyArrays.java. 2. In this problem we will create a user defined Java ArrayList holding student objects from the CUS 1126 class. Make sure you Import the ArrayList class into your source file i.e., import java.util.ArrayList. The class for students in CUS 1126 is defined as class Students{ String fname; //first name of student String lname; //last name of student int lab1_score; //score in first lab } Read up java documentation and online resources on how to insert elements in an Arraylist. Create an ArrayList with five student objects based on the class above. Print out all the member variables of each the individual students after the list has been created. Make sure you use intuitive console messages to make this clear. Call the primary source file StudentArrayList.java 3. In the same program as in 2, create a method that prints out the average of lab1 scores given an array list of students of arbitrary size as an input argument. Demonstrate this works for your five member student array list created in 2.


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.