我需要帮助这个C#程序ab out out constructors,mutators和accesors。 [英] I need help with this C# program ab out constructors, mutators and accesors please.

查看:88
本文介绍了我需要帮助这个C#程序ab out out constructors,mutators和accesors。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中编写一个程序,创建一个由教授ID和三个评级组成的ProfessorRating类。这三个评级用于评估容易度,有用性和清晰度。

在单独的实现类中,允许用户输入值。调用构造函数以创建ProfessorRating类的实例。包括适当的属性。在构造对象后不允许更改ID。

在ProfessorRating类中提供一个方法来计算并返回整体评级平均值。

Write a program in C# that creates a ProfessorRating class consisting of professor ID and three ratings. The three ratings are used to evaluate easiness, helpfulness, and clarity.
In a separate implementation class, allow the user to enter the values. Call the constructor to create an instance of the ProfessorRating class. Include appropriate properties. Do not allow the ID to be changed after an object has been constructed.
Provide a method in the ProfessorRating class to compute and return the overall rating average.

推荐答案

对不起,但这不是这个网站的工作方式;你至少应该尝试做自己的功课。有很多文章都这里 [ ^ ],在更广泛的互联网上,您可以学习以获得一些想法。
Sorry, but that is not how this site works; you are expected at least to try and do your own homework. There are more than enough articles both here[^], and in the wider internet, that you can study to get some ideas.


< ;< 创建一个由教授ID和三个评级组成的ProfessorRating类。>>

<< 在ProfessorRating类中提供一个计算方法来计算并返回整体评分平均值。。>>

<< 在单独的实现类中,允许用户输入值。。 >>

http://msdn.microsoft.com/en- us / library / x9afc042.aspx [ ^ ]



<< 在构造对象后不允许更改ID >>

http://msdn.microsoft.com/en-us/library/w86s7x04%28v=VS.80%29 .aspx [ ^ ]



Mike
<<creates a ProfessorRating class consisting of professor ID and three ratings.>>
<<Provide a method in the ProfessorRating class to compute and return the overall rating average..>>
<<In a separate implementation class, allow the user to enter the values..>>
http://msdn.microsoft.com/en-us/library/x9afc042.aspx[^]

<<Do not allow the ID to be changed after an object has been constructed>>
http://msdn.microsoft.com/en-us/library/w86s7x04%28v=VS.80%29.aspx[^]

Mike


这篇关于我需要帮助这个C#程序ab out out constructors,mutators和accesors。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆