Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CONVERT TO PYTHON Char: 1. In the class charArray, define a static main function with return type void. 2. Define parameter with string array. 3.

CONVERT TO PYTHON

Char:

1. In the class charArray, define a static main function with return type void.

2. Define parameter with string array.

3. In the main, declare an array with type char and initialize with char elements.

4. Use for loop to print.

Int:

1. In the class intArray, define a static main function.

2. Have the return type be void and parameter with a string array.

3. In the main, declare an array of type integer and allocate memory for 4 integer elements.

4. Add integer values to the array.

5. Run a for loop and print the array values.

Short:

1. In the class shortArray, define a static main function.

2. Have the return type void and parameter with a string array.

3. In the main, declare an array for type short and allocate memory for 4 short elements.

4. Add short values to the array.

5. Run the for loop for the array length.

6. Print the array values.

Long:

1. In the class longArray, define a static main function.

2. Have the return type void and parameter with a string array.

3. In the main, declare an array of long type and allocate memory for 4 long elements.

4. Add long values to the array.

5. Run the for loop for the array length. 6. Print the array values.

Byte:

1. In the class byteArray, define a static main function.

2. Have the return type void and parameter with a string array.

3. In the main, declare an array of int type.

4. Allocate memory for 4 integer elements.

5. Fill the array with integer values.

6. Run a for loop for the array length and print the array values.

Float:

1. In the class floatArray, define a static main function.

2. Have the return type void and parameter with string array.

3. In the main, declare an array of type float.

4. Allocate memory for 4 float elements.

5. Fill the array with float values.

6. Run a for loop for array length and print array values.

Double:

1. In the class doubleArray, define a static main function.

2. Have the return type be void and parameter with string array.

3. In the main, declare an array of type double.

4. Allocate memory for 4 double elements.

5. Fill the array with double values.

6. Run a for loop for the array length and print array values.

Real:

1. In the class realArray, define a static main function.

2. Have the return type be void and parameter with string array.

3. In the main, declare an array of type double.

4. Allocate memory for 4 double elements.

5. Fill the array with double values.

5. Fun a for loop for the array length and print the values by using a format function that gives precision depending on the percent number.

Double precision:

1. In the class dprecisionArray, define a static main function.

2. Have the return type be void and parameter with string array.

3. In the main, declare an array with type double.

4. Allocate memory for 4 double elements.

5. Fill the array with double values and print the values by using a format function that gives precision depending on the given percent.

Fixed:

1. In the class, fixedArray, define a static main function

2. Have the return type be void and parameter with string array.

3. In the main, declare an array of integer type and allocate memory for 4 integer elements.

4. Fill the array with integer values.

5. Run using a for loop to find the array length and print the array values.

Boolean:

1. In the class, booleanArray, define a static main function.

2. Have the return type be void and parameter with string array.

3. In the main, declare an array of boolean type.

4. Allocate the memory for 4 boolean elements.

5. Fill the array with boolean values.

6. Run using a for loop to find the array length and print the array values.

Reference:

1. In the class, referenceArray, define a static main function.

2. Have the return type be void and parameter with string array.

3. In the main, declare an array for reference data.

4. Allocate the memory for it.

5. Fill the array with the values and run using a for loop for the array length.

6. Print the array values.

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: 3

blur-text-image

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

7. What traps should she avoid?

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago