• 1500+ Experts
  • A+ Grade
  • Free Turnitin Report

A Series of Daily Detections of People with a Virus is Stored: Introduction to Programming Assignment, IT Sligo

University Institute of Technology (IT) Sligo
Subject Introduction to Programming

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

Get Solution of this Assessment. Hire Experts to solve this assignment for you Before Deadline.

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.
Get Help By Expert

Don't waste your valuable time trying to fix issues in programming assignments, just hire Sligo assignment help experts and get quality programming assignment help. Our highly-trained tutors have good coding and programming skills and they always ready to give IT assignment help to the students of IT Sligo.

Submit Your Assignment Questions & Get Plagiarism Free Answers.

Assignment-Help-Ireland.jpg

Submit Your Assignment