MotorSales Solved

20.00 $

Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip txt solution files instantly, after Payment


5/5 - (2 votes)

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?



cant be determined




  • code-1.txt