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 11:00, sjackson0625p8w1a0
Which action is good business etiquette? a. switching your cell phone off before you enter a meeting b. keeping your cell phone on low volume before you enter a meeting c. setting a pleasant ring tone on your cell phone before you enter a meeting d. setting a standard ringtone on your cell phone before you enter a meeting
Answers: 1
image
Computers and Technology, 22.06.2019 13:30, AsiaDeas4078
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
image
Computers and Technology, 23.06.2019 00:40, QueenKy6050
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why. a.) student. course. callnum = "csc230"; b.) cin > > student. name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student. name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist. course. credits = 3; j.) course = studenttype. course;
Answers: 1
image
Computers and Technology, 23.06.2019 22:20, andrew412603
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
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, 14.12.2020 18:00
Konu
Mathematics, 14.12.2020 18:00
Konu
Mathematics, 14.12.2020 18:00