Questions: 1 835

Answers by our Experts: 1 539

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Student Class:
Create a class called Student.cs. This class contains the following:
a) class data fields name, mark and grade
b) public Student (string name, double mark, string grade)
// constructor

c) public string getName() / / to return name of student
d) public double getMark() // to return mark of student
e) public string getGrade() // to return student grade
f) public void setMark(double mark) // to set student mark
g) public string setGrade(double mark) // mark is first checked using a nested if-else and switch to determine grade.
The possible grades are:
0 <= mark < 50 -
50 <= mark < 60 -
60 <= mark < 70 -
70 <= mark < 80 -
80 <= mark < 100 -
Sample Output:
Please enter number of student marks you would like to add: 2
Please enter name of student 1 : Sam
Please enter mark for student 1 : 33
Please enter name of student 2 : John
Please enter mark for student 2 : 88
Choose an option:
1. Display a Student Mark
2. Change Student Mark
3. Print out information for all students
4. Exit program
Enter Option: 1
Display a student mark
Please enter name of student you would display mark for: jjj
I am sorry. Student: 'jjj' does not exist
Choose an option:
1. Display a Student Mark
2. Change Student Mark
3. Print out information for all students
4. Exit program
Enter Option: 1
Display a student mark
Please enter name of student you would display mark for: Sam
Marks for Sam is: 33.0
Choose an option:
1. Display a Student Mark
2. Change Student Mark
3. Print out information for all students
4. Exit program
Enter Option: 2
Change Student Mark
Please enter name of student you would like to change mark for: John
Current marks for John is: 88.0
Enter new mark for John: 3333
Invalid Entry! Marks must be between 0 - 100!
Enter new mark for John: 70
New grade for John is: D
Choose an option:
1. Display a Student Mark
2. Change Student Mark
3. Print out information for all students
4. Exit program
Enter Option: 3
Print out information for all students
Name Mark Grade
Sam 33.0 F
John 70.0 D
Choose an option:
1. Display a Student Mark
2. Change Student Mark
3. Print out information for all students
4. Exit program
Enter Option: 4
I want to print * in following manner

* *
* *
* *
* *
* *
* *
* *
I want to make paint type software like photo shop and illustrator in c#so can u help me???
code in c# (2008), to use one app.config across multiple projects in a solution.
What is the purpose of a software development program construction standard? Do these standards constrain the creativity of a programmer/software developer?
There is something else about making a class and a method abstract. Why is it important? What is it "buying" us beyond virtual/override?

The abstract classes are used in order to define some behavior of the specific kind of the instances. The classic example of using the Abstract classes and Virtual Functions is the abstract class Shape and derived classes Circle, Triangle, Square etc.
Class Shape defines function "int FindArea()" for example, this function is virtual and is implemented in the derived classes. Every specific class has the specific implementation of this method. The advantage of this type of design is that we can create the
collection of the Shape references and then add to this collection the objects of the derived classes. When we call the function FindArea(), it executes for the correct type of the object.
This is the statement that brought about the question:The abstract classes are used in order to define some behavior of the specific kind of the instances. The classic example of using the Abstract classes and Virtual Functions is the abstract class Shape and derived classes Circle, Triangle, Square etc. Class Shape defines function "int FindArea()" for example, this function is virtual and is implemented in the derived classes. Every specific class has the specific implementation of this method. The advantage of this type of design is that we can create the collection of the Shape references and then add to this collection the objects of the derived classes. When we call the function FindArea(), it executes for the correct type of the object.

My Professor asked the question : There is something else about making a class and a method abstract. Why is it important? What is it "buying" us beyond virtual/override?

V/r,

Kevin
There is something else about making a class and a method abstract. Why is it important? What is it "buying" us beyond virtual/override?
Under what circumstances would you create an inheritance relationship that includes Abstract Classes and Virtual functions? What is the advantage of this type of design?
How to I make a program which prints * in diamond in C#?
LATEST TUTORIALS
APPROVED BY CLIENTS