(1)自我评估自我评估三道题:(a)请估计你的编码量(机器生成的代码不算)(b)你使用过什么源代码管理工具?(只使用过一、两次的不算)(c)你习惯使用什么样的开发工具/IDE?(2)机试一个hello world题。主要考察基本的OO设计及编码风格。C#版:(a)写一个类Message,该类具备以下成员:·一个名为message,储存消息文本;·一个方法Show(),打印消息文本;·一个构造函数,根据传递的字符串,初始化消息文本。·其它你认为需要的东西(b)调用Message的实例,打印“hello world”。。(3)请谈谈 DataTable, DataSet, DataAdapter的角色与功能(4)简答题(a) 谈谈你对facade模式的理解与心得(b) 谈谈你对.net framework的理解与使用心得(c) 想产生一个数列:T(n) = T(n-1),n,T(n-1),T(0) = 1比如T(3)是1,2,1,3,1,2,1T(4)是1,2,1,3,1,2,1,4,1,2,1,3,1,2,1不用递归有什么效率高的算法吗?
解决方案 »
- repeater默认项数目怎么修改?
- 求教XML怎么与数据库同步增删改查?
- FireFox下无法用js调用服务器端事件
- 最近手痒,想做个网站玩,给点建议,顶者有分
- 无法新建asp.net web应用程序
- 访问客户端的xml文件
- 还剩下20分了问个三层的问题。新手 大家不要看分 就算传授技术吧
- 如何判断WebBrowser是否加载完成
- 一个datagrid的问题
- ★求救!我的Aspx文件可以运行,但Asp文件却不能运行了!
- 百分求助!c# 使用webbrowser控件问题,自动登录页面后,点新页面自动返回初始登录系统
- iframe问题?在ie6下,iframe横向滚动条消失!如果方法真正有效奉上100分!
(c)vs
using System;
public class HelloWorld
{
public string strHelloWorld
{
get
{
return "Hello World";
}
} public static void Main()
{
HelloWorld hw = new HelloWorld();
Console.WriteLine(cs.strHelloWorld);
}
}
Facade(外观)模式
Facade设计模式更从架构的层次去看系统,而不是单个类的层次。Facade很多时候更是一种架构设计模式。
{
public void TurnOn()
{
Console.WriteLine("Turning on the camera.");
} public void TurnOff()
{
Console.WriteLine("Turning off the camera.");
} public void Rotate(int degrees)
{
Console.WriteLine("Rotating the camera by {0} degrees.", degrees);
}
}public class Light
{ public void TurnOff()
{
Console.WriteLine("Turning on the light.");
} public void TurnOn()
{
Console.WriteLine("Turning off the light.");
} public void ChangeBulb()
{
Console.WriteLine("changing the light-bulb.");
}
}public class Sensor
{
public void Activate()
{
Console.WriteLine("Activating the sensor.");
} public void Deactivate()
{
Console.WriteLine("Deactivating the sensor.");
} public void Trigger()
{
Console.WriteLine("The sensor has triggered.");
}
}public class Alarm
{ public void Activate()
{
Console.WriteLine("Activating the alarm.");
} public void Deactivate()
{
Console.WriteLine("Deactivating the alarm.");
} public void Ring()
{
Console.WriteLine("Ringing the alarm.");
} public void StopRing()
{
Console.WriteLine("Stop the alarm.");
}
}public class Client
{
private static Camera camera1, camera2;
private static Light light1, light2, light3;
private static Sensor sensor;
private static Alarm alarm; static Client()
{
camera1 = new Camera();
camera2 = new Camera();
light1 = new Light();
light2 = new Light();
light3 = new Light();
sensor = new Sensor();
alarm = new Alarm();
} public static void Main( string[] args )
{
camera1.TurnOn();
camera2.TurnOn();
light1.TurnOn();
light2.TurnOn();
light3.TurnOn();
sensor.Activate();
alarm.Activate();
}
}