可视化编程技术实验报告【参考】.docxVIP

  • 297
  • 0
  • 约5.2万字
  • 约 64页
  • 2017-01-05 发布于浙江
  • 举报
可视化编程技术实验报告姓名:XXX学号:XX学院: XXXXXXXXXX可视化编程技术实验报告实验一面向对象编程——类和对象编程【实验目的】如何创建类和对象。如何为定义的类编写相应的方法。如何通过属性访问对象中的数据【实验要求】写出程序,并调试程序,要给出测试数据和实验结果。整理上机步骤,总结经验和体会。完成实验日志和上交程序。 【实验内容】[程序1-1]编写一个控制台应用程序,定义并使用一个时间类,该类包含时,分,秒字段与属性,具有将时间增加1秒,1分,1小时的方法,具有分别显示是,分,秒和同时显示时分秒的方法[程序代码]using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication2{ class Time { private int second; private int minute; private int hour; public Time(int s, int m, int h) { second = s; minute = m; hour = h; } public int Second { get { return second; } set {

文档评论(0)

1亿VIP精品文档

相关文档