Question: i need help writing this class and program in java and follow tha insturction of 4a and 4b thank you 13) (20 points)Complete the following

13) (20 points)Complete the following Sale and SaleDemo classes. 4.a) Sales class. Tt has a field, 10 -element array that holds the sales for 10 stores. The program has three methods: a) a constructor that accepts an array parameter. b) a method that returns the maximum sales for the stores. c) a method that returns the total sales for the stores. /I Sales Program public class Sales - 4.1) (3 points) declare a private 10 -element array named sales that hoids the sales for 10 stores, */ (4.2) ( 3 points) define a constructor that accepts an array parameter and use it to initialize the field sales. % \#4.3) (3 points) write a method named maxSales. It has no parameters, and returns the maximum sales among the 10 stores. (44.4) ( 3 points) write a method named totalSales. It has no parameters, and returns the total sales among the 10 stores. */ Sales Derna Proprarn jeblie class Snlengrua if goblic static poid tratis (Stringilaria) if. 'Dorfne ary vitiables you noces -4.4) (2. pointsy define a 10 , clietane andy which coctinis the sales for 10 stores, and initialize them to be {16900,21254,17090,35100,26291,36095,39784, Yhosov. 29500,43100)= (i4is) (3 points) Eeate nu object of Shles, staresales, and pass the abowe andy to the object. tesoly =1 Yrend of main method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
