0

[Abandoned] Am I doing it Correct or Not?

I have several questions to ask which are related to this assignment. This is First time I'm attempting someone else assignment which requires classes/objects in C#. In the past, I've already used classes in some projects in C++. (if you're interested you can checkout my github project Rellotscrewdriver/Digital Measurement-Calculator) 1. the stolen assignment is in answers section since it out of word limit. I have a weird feeling that something is wrong https://code.sololearn.com/c1a14A18A160/?ref=app 2. is the 7th point in assignment asking check wether the input is to be checked if it is vaild or not? or asking to use Unit Testing? I'm sorta confused. 3. is the code readable? giveme some suggestion to improve the readability of my codes. anyone can answer any one of the points but I would mark the answer as best if you give answer to all three points vaild

15th Jun 2021, 4:28 AM
Rellot's screwdriver
Rellot's screwdriver - avatar
3 Respostas
+ 3
1)7th point most likely wants you to check if the score is within limits or not. But if no-one is checking your program then there is no harm in writting a test suite to unit test the program. 2) in terms of readability, this code looks decent to me , but i am not a C# dev, so this would be better answered by someone more experienced in that department.
15th Jun 2021, 5:17 AM
Arsenic
Arsenic - avatar
0
here's the assignment: Using objects with methods of Student class 1. Write a Student class (without main method) and declare 3 instance variables in this class: a String variable for the first name (firstN), a String variable for the last name (lastN) and an array (Tgrades) of the student’s exam grades (size =3). 2. Declare a method named createObjectStudent() that fills the student information from the keyboard. 3. Create a constructor in which you can create the array of grades. 4. Declare a method named sumGrades() that computes the sum of the grades and returns the result. 5. Create a method named showStudent() that displays the information of the student S (the first name, the last name and the sum). 6. Declare a Test class with the main method: a. Create an instance S1 of class Student, b. Call the createObjectStudent() method to fill the instance S1, c. Call the sumGrades() method to compute the sum of the student S1, d. Call showStudent() to display the information of this instance.
15th Jun 2021, 4:30 AM
Rellot's screwdriver
Rellot's screwdriver - avatar
0
7. Add a control test for the grades in the createObjectStudent() method in order to enter : a. The first grade between 0 and 30. b. The second grade between 0 and 30. c. The third grade between 0 and 40
15th Jun 2021, 4:30 AM
Rellot's screwdriver
Rellot's screwdriver - avatar