1.6

所属分类:C#编程
开发工具:C#
文件大小:10KB
下载次数:4
上传日期:2008-12-29 07:32:09
上 传 者qbb3050466
说明:  编写一个控制台应用程序,完成下列功能,并写出运行程序后输出的结果。 1) 创建一个类A,在A中编写一个可以被重写的带int类型参数的方法MyMethod, 并在该方法中输出传递的整型值加10后的结果。 2) 再创建一个类B,使其继承自类A,然后重写A中的MyMethod方法,将A中接 收的整型值加50,并输出结果。 3) 在Main方法中分别创建类A和类B的对象,并分别调用MyMethod方法
(Write a console application, complete the following functions, and write the output after running the program results. 1) create a category A, in A in the preparation of a can be rewritten with int type parameters MyMethod, and in the methods of transmission of the output value of 10 after cosmetic surgery results. 2) re-creation of a category B, so that it inherited from the category A, and then rewrite A in MyMethod method to receive the integer A value of plus 50, and output results. 3), respectively, in the Main method to create category A and category B of the object, and call respectively MyMethod method)

文件列表:
第六题.docx (12763, 2008-12-23)

近期下载者

相关文件


收藏者