GUNZaBLAZE
Apprentice
Hello! So I am currently taking intro to java class as a requirement and I do not understand it when it comes to writing the programs. I get good grades on my tests though cus its just multiple choice but when it comes to writing my program assignments i am lost.
I need help with writing the programs because i am completely lost and i only understand some of them. I will give the person who helps me a $20.00 gift card to psn or xbox live store to do my assignments for me. About 10 more are remaining.
Its not cheating I just have other classes that really matter to my major and take up a lot of time.
Here are two assignments i need,
1st assignment
-Write an Applet that is a random number of colored graphics objects – you may choose lines, circles, etc, or a mix of these objects.
You will need to use the Java Random object.
Second assignment
-1. Given that the integer array y has the following elements : [1 2 3], what is the contents of integer array x after executing the following statements :
for (int i = 0; i < 3; i++)
x = y[2-i];
Answer = ____________________________________
2. Write a function that finds the length of a vector.
double Length( double X[ ] )
The length of a vector is the square root of the sum of the squares of the elements in the array. Use dynamic memory and allocate 10 elements for X. Initialize the data values of X to the counting numbers 1-10.
3. Write a function called Average( ) that takes as a parameter a one dimensional array of doubles called A.
Double Average( double A[ ] )
The function computes and returns the average value of the elements in the array (the sum of the elements in the array divided by the number of elements). Use dynamic memory and allocate 10 elements for A. Initialize the data values of A to the counting numbers 1-10.
4. Write a complete program which does the following:
a. Declares an array which holds 4 character strings.
b. Use a for loop and read in 4 character strings and place them in the array.
c. Use a separate for loop to print out the character strings.
If anyone is interested let me know
I need help with writing the programs because i am completely lost and i only understand some of them. I will give the person who helps me a $20.00 gift card to psn or xbox live store to do my assignments for me. About 10 more are remaining.
Its not cheating I just have other classes that really matter to my major and take up a lot of time.
Here are two assignments i need,
1st assignment
-Write an Applet that is a random number of colored graphics objects – you may choose lines, circles, etc, or a mix of these objects.
You will need to use the Java Random object.
Second assignment
-1. Given that the integer array y has the following elements : [1 2 3], what is the contents of integer array x after executing the following statements :
for (int i = 0; i < 3; i++)
x = y[2-i];
Answer = ____________________________________
2. Write a function that finds the length of a vector.
double Length( double X[ ] )
The length of a vector is the square root of the sum of the squares of the elements in the array. Use dynamic memory and allocate 10 elements for X. Initialize the data values of X to the counting numbers 1-10.
3. Write a function called Average( ) that takes as a parameter a one dimensional array of doubles called A.
Double Average( double A[ ] )
The function computes and returns the average value of the elements in the array (the sum of the elements in the array divided by the number of elements). Use dynamic memory and allocate 10 elements for A. Initialize the data values of A to the counting numbers 1-10.
4. Write a complete program which does the following:
a. Declares an array which holds 4 character strings.
b. Use a for loop and read in 4 character strings and place them in the array.
c. Use a separate for loop to print out the character strings.
If anyone is interested let me know