In Progress

Create 2 Java Programs Using Info Provided

I need 2 java programs created using using specifics given. Below

PROGRAM # 1

[url removed, login to view] a class dataset that stores a number of values of type double. Provides a constructor

Public dataset (int maximumNumberOfValues)

And a write a method

Public void add (double value) that adds a value.

Lastly provide methods to compute the sum, avg, max, and min values

Please feel free to work off of what I started. Thanks

*/

public class DataSet

{

// Implmentation

. . .

/**

Constructs an empty data set.

@param maximumNumberOfValues the maximum this data set can hold

*/

public DataSet(int maximumNumberOfValues)

{

. . .

}

/**

Adds a data value to the data set if there is room in the array.

@param value a data value

*/

public void add(double value)

{

. . .

}

/**

Gets the sum of the added data.

@return sum of the data or 0 if no data has been added

*/

public double getSum()

{

. . .

}

/**

Gets the average of the added data.

@return average of the data or 0 if no data has been added

*/

public double getAverage()

{

. . .

}

/**

Gets the maximum value entered.

@return maximum value of the data

NOTE: returns -Double.MAX_VALUE if no values are entered.

*/

public double getMaximum()

{

. . .

}

/**

Gets the minimum value entered.

@return minimum value of the data

NOTE: returns Double.MAX_VALUE if no values are entered.

*/

public double getMinimum()

{

. . .

}

}

/**

Run some tests for the DataSet class

*/

public class DataSetTester

{

public static void main(String[] args)

{

DataSet data = new DataSet(5);

[url removed, login to view](3.5);

[url removed, login to view](7.9);

[url removed, login to view](15.2);

[url removed, login to view](-7.3);

[url removed, login to view]("Sum: " + [url removed, login to view]());

[url removed, login to view]("Expected: 19.3");

[url removed, login to view]("Average: " + [url removed, login to view]());

[url removed, login to view]("Expected: 4.825");

[url removed, login to view]("Maximum: " + [url removed, login to view]());

[url removed, login to view]("Expected: 15.2");

[url removed, login to view]("Minimum: " + [url removed, login to view]());

[url removed, login to view]("Expected: -7.3");

}

}

PROGRAM#2

2. A supermarket wants to reward its best customers of each day, showing the customer’s name on a screen in the supermarket. For that purpose the store keeps an Arraylist in the Store class. Please implement the following methods.

Public void addSale(String customerName, double amount )

Public String nameOfBestCustomer ()

To record the sale and returns the name of the customer with the largest sale.

Please use the following information to write a program that prompts the cashier to enter all prices, and names. Adds them to a store object, and displays the best customer’s name.

import java.util.*;

/**

* Code for [url removed, login to view]

* @author

*/

public class Store

{

public String nameOfBestCustomer(ArrayList<Double> sales,

ArrayList<String> customers)

{

String top = " ";

// Your work starts here

// Your work ends here

return top;

}

public static void main(String[] args)

{

ArrayList<Double> price = new ArrayList<Double>();

ArrayList<String> names = new ArrayList<String>();

Scanner in = new Scanner([url removed, login to view]);

// Your work starts here

// Your work ends here

Store top = new Store();

[url removed, login to view]("Best customer's name "

+ [url removed, login to view](price, names));

}

}

Skills: Java

See more: I need training material created from my company manual, i need java instructor freelancer, i need java 7, i need a logo created vector eps jpeg, i need java programmer in hyderabad, i need a logo created for my company we sell shipping and packing, i need a design created, need website looks created using photoshop, example program using parser class parse text java, using windows media player inside java, using symmetric key password jsp java sun

About the Employer:
( 5 reviews ) wdm, United States

Project ID: #15141509

Awarded to:

adeellhr786

hi i am a java SE ,ee developer this is easy work lets start it. visit my profile and see what other people say about me Relevant Skills and Experience java SE, EE Proposed Milestones $30 USD - milestone

$15 USD in 1 day
(20 Reviews)
4.7

4 freelancers are bidding on average $28 for this job

rohitagarberg

hi sir, i will create the java class with the details provided to maintain the list of double values, thanks............................................................ Relevant Skills and Experience java Proposed Mi More

$15 USD in 1 day
(44 Reviews)
5.3
$50 USD in 1 day
(49 Reviews)
5.1
ingluisvasquez

I can help you in max 1 day! I know a lot of about Java and Java Web.

$30 USD in 1 day
(0 Reviews)
0.0