[Solved] MotorSales

$25

File Name: MotorSales.zip
File Size: 94.2 KB

SKU: [Solved] MotorSales Category: Tag:
5/5 - (1 vote)

write a class called MotorSales. the class accepts an array of numbers representing the sale of each car. apart from the constructor, write two mutator methods;

one called sum, that calculates the total sales

the other called findLowest, that finds the lowest sale amount

also write an accessor method that returns the total amount in sales

you are responsible for declaring the appropriate variables in the class

do not write a test class none is necessary

Carry out the following operations at it pertains to a one dimensional array

a. declare an array integer of 100 elements

b. populate the array the following way

i.Ones in the even number index

ii place 2 at index zero

iii. place 20 in the 50th position array

consider the two lines of code

int [] x = {2,3,4,5,6,7,8,9,1,0};

int y = x{1} +x[x[0]];

what value is stored in the variable y?

5

6

cant be determined

1

4

7

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] MotorSales
$25