C# PROGRAMMING.

Need help creating C# program that will record the number of hours a student studies in a week.

THIS REQUIRES THE PASSING OF DATA.
**In the StudentUI class , it will have the following methods and parameters.
-public void DisplayAverage(Student theStudent)
-public void DisplayData(Student anyStudent)
-public void FillHours(Student theStudent)
-public string GetName(Student myStudent)
-public int GetStudentID(Student myStudent)
-public void MainMethod()
**In the Student class it will have the following methods and parameters.
-public double CalculateAvg()
-public void EnterHours(int index, double hrs)
-public double[] GetNumberHours()
It will display those hours and then calculate the average amount of time the student studies per day
Create a Student Class per the UML Class Diagram above or below.
int id
string name
double hours[7]
(Could have Total if you want to display Total Hours)
Please notice that hours is an Array.
Create a StudentUI Class that contains the presentation (console logic). All of the reading or writing to the console will be nandled in the methods of the StudentUI Class.
See the UML Diagram above. It is given in Word format and also in an html fomat in case you are having trouble opening the Word.
string days[] = “Sunday”, “Monday”, “Tuesday” etc. //class level
MainMethod() //read in the student name and id, instantiate a Student object and call all of the methods in class
FillHours(Student) //loop to prompt for input and add to the student classes array.
DisplayData(Student) //Display name id and Array contents…
DisplayAverage(Student) of //Display study hours per week.
Main will instantiate a StudentUI Class and Call the MainMethod.

Leave a Reply

Your email address will not be published.