Computers and Technology
Computers and Technology, 27.03.2020 20:28, dilly2277

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, jahi1201
Ahorse is how much percent more powerful than a pony
Answers: 1
image
Computers and Technology, 22.06.2019 15:00, vladutraileanu7599
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
image
Computers and Technology, 22.06.2019 19:20, mahaleyrenee1195
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
image
Computers and Technology, 23.06.2019 11:30, kyraj21
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
Do you know the correct answer?
The code below shows a class DataSet, which provides basic statistical functionality on a set of dat...

Questions in other subjects:

Konu
English, 23.11.2020 08:40
Konu
Mathematics, 23.11.2020 08:50
Konu
Mathematics, 23.11.2020 08:50