Kasım Öztürk

Kasım Öztürk

  • NA
  • 19
  • 532

c sharp homework

May 16 2020 4:42 PM

CSE 106 LAB EXERCISES


Q1) Write a method that calculates the variance of the numbers in an array.

Variance of a n numbers a1, a2, …, an is equal to

where m is the mean of these numbers.

Q2) Write a Person class with the following properties

string name

int age

double weight

Write the getter and setter methods for all properties. Furthermore, create 2 instances of the Person class and set thie properties using the setter methods you defined.

Q3) Write a method that sorts the elements of an integer array in descending order.


Answers (2)