Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1)What is printed from the following statements: int x[] = int [10]; for(int i=50; i

1)What is printed from the following statements:

int x[] = int [10];

for(int i=50; i<500; i +=50)

x[i] = i;

2)Create an array of 100 integers. Store random integers in the range 60-200 in the array elements. Write all the required statements, not the whole program.

3)Create a 2-dimensional array of strings with 2 rows and 3 columns. Assume each row has a persons name, his/her city name, and its zip code. Write assignment statements to assign Washington, Mt. Vernon, 22309 to the second row elements of the array you created.

4)Write the method printArray() which accepts an array of decimal numbers and prints them in the method.

5)Write the method sumArray() which accepts an array of integers and returns the sum of all the numbers.

6)Write a method to accept a 2-D array of decimals and print the array in a matrix form.

7)Write statements to define an Animal class and its constructors. Each animal will have a species (like elephant) and classification (like mamal, fish, birds, reptiles, amphibians, and invertibrates).

8)Write statements to define an Elephant as a sub-class of Animal class and its constructors. Each elephant will have subspecies (Asian or African) and population (like 28000 Indian elephants).(Java)

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_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Explain the chemical properties of acids with examples.

Answered: 1 week ago

Question

Write the properties of Group theory.

Answered: 1 week ago