Reference no: EM132169203
Using JAVA
Array Exercises: Create a class named ArrayExercises that contains the following array tasks in the main method:
1. Write some code that asks the user to enter an integer via the keyboard, use that integer to set the length of an array and populate it with random integers from -17 to 19 (inclusive). Print the array back in a nice way (10 numbers per line with commas and such);
2. Below that write some java to reverse the arrays:
char[] a = {'t', 'o', 'y', 'o', 't', 'a'} char[] b = {'r', 'a', 'c', 'e', 'c', 'a', 'r'}
You should do this by creating new arrays to store the reversal. Then write some more java code to prove to me that array b contains a palindrome, while array a does not.
3. (Challenge:) Write a method in your class called reverseArray that is of void return type and it takes as argument a String array (any String array the teacher can think of!) and it reverses the given array in place. That is, it manipulates the given array and modifies it.
Draw a line using point draw and bresenhams line algorithm
: To program a graphics program the first thing to consider is the display window (or canvas) itself. This is specified and implemented using library functions.
|
Set the length of an array and populate it with random int
: Write some code that asks the user to enter an integer via the keyboard, use that integer to set the length of an array and populate it with random integers.
|
Create an erd crows foot diagram showing the entities
: Create an ERD crows foot diagram showing the entities and the relationships between them with cardinalities.
|
Define the image as a matrix a using the imread function
: Define the image as a matrix a using the imread function. What is the height and width in pixels?
|
Write a method in your class called reversearray
: Write some code that asks the user to enter an integer via the keyboard, use that integer to set the length of an array and populate.
|
Design a vending machine that takes coins
: Design a vending machine that takes coins of 1, 5, 10, and 25 cents. Ask the user what he wants to purchase, by selecting for a Coke.
|
Write a program in java with pseudocode using the io module
: The user puts some money into a savings account. Each month, they might (or might not) make a deposit into that account.
|
Create an external style sheet for your index page
: Create an external style sheet for your index page. Make the headings sans-serif and centered. Make the headings sans-serif, italic.
|
What design modifications will need to be considered
: What diversity accommodations, for potential users visiting your selected city, will you design for in addition to skill levels and age demographic?
|