octverve的专栏

是的,我是为了生存才学它的,所以学的一般

用户操作
[即时聊天] [发私信] [加为好友]
octverveID:octverve
224727次访问,排名342(-1),好友0人,关注者141人。
octverve的文章
原创 108 篇
翻译 0 篇
转载 815 篇
评论 51 篇
最近评论
zhaiyujia860417:有Java方面的么?最近在弄Java的图片处理,也很棘手啊
anan3000:装sp1就可以了吧,但我的没有vss哦
windz:这么简单的问题说半天.

假如MC是动态生成的,而非库中的元件又该如何解决呢?
octverve:从业多年,从无名到有名的企业,许多管理多采用这类方法……,应对方法很简“你不是我的上帝,所以你不能摆布我……”
octverve:从业多年,从无名到有名的企业,许多管理多采用这类方法……,应对方法很简“你不是我的上帝,所以你不能摆布我……”
文章分类
收藏
    相册
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    转载 一道.net编程题 收藏

    新一篇:  数据库开发个人总结(ADO.NET小结)  | 旧一篇: [转] ASP.NET 常见参考项目的 UI、BLL 、Model 、 DAL 分析

    朋友ANT给了个题目做
    要求:(环境 VS2003+MSSQLServer2000)
        编写一个银行客户类,要求有基本的构造函数,同时包含姓名,帐号,存款余额等属性,并且要求实现构造函数的重载。对于该银行客户类,实现属性存款余额的读写操作,实现包含异常处理的验证文本框输入是否有效整型数的功能,创建一个指向SQL SERVER的连接,并将数据库中的数据在DataGrid控件中显示.

    /// <summary>
    /// 银行客户类
    /// </summary>

    public class BankCustomer : Customer, IBankCustomer
    {
        
    public BankCustomer() : base() { }

        
    public BankCustomer(int customerId, string customerName, Account accountInfo)
            : 
    base()
        
    {
            
    this._customerId = customerId;
            
    this._customerName = customerName;
            
    this._accountInfo = accountInfo;
        }
     

        
    /// <summary>
        
    /// 读取客户及帐户相关信息
        
    /// </summary>

        public override void Load()
        
    {
            
    throw new Exception("The method or operation is not implemented.");
        }


        
    /// <summary>
        
    /// 新开户
        
    /// </summary>

        public override bool Insert()
        
    {
            
    throw new Exception("The method or operation is not implemented.");
        }


        
    /// <summary>
        
    /// 更新客户信息
        
    /// </summary>

        public override bool Update()
        
    {
            
    throw new Exception("The method or operation is not implemented.");
        }


        
    /// <summary>
        
    /// 删除
        
    /// </summary>

        public override bool Delete(string customerId)
        
    {
            
    throw new Exception("The method or operation is not implemented.");
        }


        
    IBankCustomer 成员
    }


    /// <summary>
    /// 银行帐户类
    /// </summary>

    public class Account
    {
        
    private string _accountNo = string.Empty;
        
    private float _balance = 0;

        
    public Account()
        
    {
            
    //在此处添加逻辑
        }


        
    public Account(string accountNo, float balance)
        
    {
            
    this._accountNo = accountNo;
            
    this._balance = balance;
        }


        
    /// <summary>
        
    /// 帐号
        
    /// </summary>

        public string AccountNo
        
    {
            
    get return this._accountNo; }
            
    set this._accountNo = value; }
        }


        
    /// <summary>
        
    /// 余额
        
    /// </summary>

        public float Balance
        
    {
            
    get return this._balance; }
            
    set this._balance = value; }
        }

    }


    /// <summary>
    /// 客户类
    /// </summary>

    public abstract class Customer
    {
        
    protected string _customerId = string.Empty;
        
    protected string _customerName = string.Empty;
        
    protected Account _accountInfo = null;

        
    public Customer()
        
    {
            
    //在此处添加代码
        }


        
    public string CustomerId
        
    {
            
    get return this._customerId; }
            
    set this._customerId = value; }
        }


        
    public string CustomerName
        
    {
            
    get return this._customerName; }
            
    set this._customerName = value; }
        }


        
    public Account AccountInfo
        
    {
            
    get return this._accountInfo; }
            
    set this._accountInfo = value; }
        }


        
    public abstract bool Insert();

        
    public abstract bool Update();

        
    public abstract bool Delete(string customerId);

        
    public abstract void Load();

    }


    public interface IBankCustomer
    {
        
    bool Add(float money);
        
    bool Take(float money);
    }

     

    发表于 @ 2008年02月11日 11:48:00|评论(loading...)|编辑

    新一篇:  数据库开发个人总结(ADO.NET小结)  | 旧一篇: [转] ASP.NET 常见参考项目的 UI、BLL 、Model 、 DAL 分析

    评论

    #cm0201 发表于2008-02-13 21:31:21  IP: 61.137.42.*
    有时间我就做做!!
    发表评论  


    当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
    Csdn Blog version 3.1a
    Copyright © octverve