subject

The code below shows a class DataSet, which provides basic statistical functionality on a set of data, and a class ExamMarks, which uses DataSet to store and work out the average of a set of exam marks. The main function shown reads in two marks and uses ExamMarks to store them and print out the average. Draw a sequence diagram showing the interaction that takes place when the main function executes.

class DataSet private float data private int items public Data Set data new float. [256] items public void addDataPoint (float d) data [items++] d public float mean float total o for (int i o i get Size i++) total data [i] return total get Size public int getsize return items; Class ExamMarks private Dataset marks public void enterMark (float m) if (marks null) marks new Data Set marks addDataPoint (m) float average return marks. mean public class Average public static void main (string args ExamMarks exam new ExamMarks exam enterMark (56) exam enterMark (72) System. out print, ln (exam average

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
You have a small company and want to keep your costs low, but it is important your employees share data. which network would provide you with the most economical solution?
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
You know the right answer?
The code below shows a class DataSet, which provides basic statistical functionality on a set of dat...
Questions
question
Mathematics, 16.02.2021 22:40
question
Chemistry, 16.02.2021 22:40
question
Mathematics, 16.02.2021 22:40
question
Geography, 16.02.2021 22:40
question
Biology, 16.02.2021 22:40
question
Social Studies, 16.02.2021 22:40
Questions on the website: 13722363