Cash-back offer from November 12th to 15th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50. Post Your Questions Today!

Question Details Normal
$ 28.00

Create an Interface called ICommon

Question posted by
Online Tutor Profile
request

1. Create an Interface called ICommon (in a file called Interfaces.cs). ICommon only contains one member.

Ignore the plus sign on the interface in the UML. We all know that Interfaces cannot have access modifiers specified for them.

2. Create a class called Person (in a file called Person.cs) that “must be inherited”. Make the class Public.

Add the attributes and their respective gets/sets defined in the UML. You DO NOT need to add a get/set for the attribute called numberOfPeople. Don’t forget what an underlined attribute or method means! In this case, create a method called GetNumberOfPeople to return the number of people created.

Next, create a “must override” method called GetFullName. Notice it is italicized, that means it has no method body defined in this class.

Lastly, add a 0-Argument constructor to this class. If needed, initialize all attributes to default values, for example, strings to empty quotes, numbers to zeros, and also increment (by one) the numberOfPeople attribute.

3. Create a class called Professor (in a file called Professor.cs) that is derived from Person. Make the class public.

Add the attribute defined in the UML. You DO NOT need to add a get/set for the attribute called numberOfProfessors. Don’t forget what an underlined attribute or method means! In this case, create a method called GetNumberOfProfessors to return the number of Professors created.

Add a method called GetFullName that returns the Professor’s title and name. For example, using my first and last name, it should return, Professor Chris Martin (if that is what the first and last name attributes were set to).

Lastly, add a 0-Argument constructor to this class. If needed, initialize all attributes to default values, for example, strings to empty quotes, numbers to zeros, and also increment (by one) the numberOfProfessors attribute.

4. Create a class called Student (in a file called Student.cs) that is derived from Person. Make the class Public.

Add the attributes and their respective gets/sets defined in the UML. You DO NOT need to add a get/set for the attribute called numberOfStudents. Don’t forget what an underlined attribute or method means! In this case, create a method called GetNumberOfStudents to return the number of Students created.

Add a method called GetFullName that returns the student’s name with appropriate salutation based on the gender attributes (basically Ms. for a female, and Mr. for a male). To make sure that you’re coding to what I am expecting, assume that I am using “F” for female, and “M” for male to represent the Gender of the Student.

For example, a female student should return, Ms. Sally Smith (if that is what the first and last name attributes were set to) and a male student should return Mr. Bob Builder (if that is what the first and last name attributes were set to).

Add a method called CalculateAverage that takes 2 Scores. Refer to UML for naming and data types. Assign the Average to the Average attribute.

Add another method called CalculateAverage that takes 3 Scores. Refer to UML for naming and data types. Assign the Average to the Average attribute.

Lastly, add a 0-Argument constructor to this class. If needed, initialize all attributes to default values, for example, strings to empty quotes, numbers to zeros, and also increment (by one) the numberOfStudents attribute.

attachment
Attachment
Available Answers
$ 28.00

[Solved] Interface called ICommon Scored 100%

  • This Solution has been Purchased 1 time
  • Submitted On 19 Jan, 2015 06:48:24
Answer posted by
Online Tutor Profile
solution

This Tutorial is rated A+ p...

Buy now to view the complete solution
Other Related Questions

No related question exists

The benefits of buying study notes from CourseMerits

Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton
Only 45 characters allowed.
closebutton

$ 629.35