Polished essays

Have any queries?  send us an email

Login
Live Chat
  • Home
  • Our services
  • How it works
  • Pricing
  • About us
  • Contact us
Order Now

  • Home
  • Our services
  • How it works
  • Pricing
  • About us
  • Contact us
Order Now

A Series Of Daily Detections Of People With A Virus Is Stored: Introduction To Programming Assignment

QUESTION 1

A series of daily detections of people with a virus is stored in the CSV file “virus.txt”, the format of the file M is given below:

23/03/2020, 8

24/03/2020, 6

25/03/2020, 2

26/03/2020, 5

27/03/2020, 9

Write a program that reads the data from the file and create a report with the format

virus Detection Report

Date                              Detections

23/03/2020                    8

24/03/2020                    6

25/03/2020                    2

26/03/2020                   5

27/03/2020                    9

Average = 6

Highest detections recorded = 9 on 27/03/2020

Days with detections > 5 = 3

Using the same file from above, produce a report that displays the number of days that had detections that were in the ranges 0, I-9,10-19,20-20,30+ Range Report

Range                    Number of Days
0                                   0

1-9                              5

10-19                        0

20-2 9                     0

30+                           0

QUESTION 2

a) Write a class to represent a Student:

  1. The class should have three attributes to represent the students gender (string), fee (double), and a unique student number (int).
  2. Provide a default constructor that sets a unique value for the student number. Also, provide a single parameterized constructor that should Initialise the name and fee attributes to values that are passed to the constructor and sets a unique value for the student number.
  3. Provide getter and setter methods for the attributes.
  4. Provide a single method called CalcDiscount which returns a discount amount available to a student, the discount rate is 10% of the fee.
  5. Write a subclass of this Student class to represent a non-EU student. For this, you should an additional attribute for nationality (string). Also write a replacement method for the CalcDiscount method, where the discount rate for a non-EU student is 2%.
  6. Provide a ToString() methods for each class to return values of all of a students attributes and the available discount.

b) Write a Main() method in the program.cs class to use the Student and Non_EU classes. Here you will:

  1. Declare an array of 4 elements to store both student and Non_EU objects.
  2. Fill this array with two of each type of object, using your constructors
  3. Loop through the array and use the ToString() method to print the attributes for each student object and discount available.
Services at a glance
  • Essay writing
  • Dissertation
  • Thesis
  • Research paper
  • Coursework
  • Term Paper
  • Case Study
  • Editing/Profreading
Free assistance
  • Amendments $0
  • Title page $0
  • Outline $0
  • E-mail delivery $0
  • Editing $0
  • Bibliography $0
Customers reviews

Awesome writing service!

Got a clean A. I had the writer revise a few areas and I’m here… Read more “Awesome writing service!”

This service is always on time

When you thought completing  a 4-page in one hour was impossible and bam! your writer… Read more “This service is always on time”

Working and studying at the same time is real trouble.

I have really struggled to work to pay bills and study with all the assignments… Read more “Working and studying at the same time is real trouble.”

Way to go, EssayWriting!

With all the stuff going on, I have been doing doordash to make a living.… Read more “Way to go, EssayWriting!”

About us

We are a leading essay writing platform where quality, confidentiality, reliability, and originality are paramount.

Best essay writers

Our writers have minimum Master degrees, and a vast experience in professional academic writing.

Make your payment from a trusted vendor

 

© 2020 Polishedessays. All Rights Reserved.