pl sql 官方英文文档
这是关于pl/sql 开发文档,有需要的朋友可以下载看看。谢谢。
ASP.NET电脑信息系统代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace information_of_computers
{
[Serializable]
public class Computer
{
public Computer() { }
public Computer(string name, string brand, string cpu, string memory, string hardDisk, string monitor)
{
this.Name = name;
this.Brand = brand;
this.CPU = cpu; this.Memory = memory;
this.HardDisk = hardDisk;
this.Monitor = monitor;
}
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
private string brand;
public string Brand
{
get { return brand; }
set { brand = value; }
}
private string cpu;
public string CPU
{
get { return cpu; }
set { cpu = value; }
}
private string memory;
public string Memory
{
get { return memory; }
set { memory = value; }
}
private string hardDisk;
public string HardDisk
{
get { return hardDisk; }
set { hardDisk = value; }
}
private string monitor;
public string Monitor
{
get { return monitor; }
set { monitor = value; }
}
}
}
asp.net程序ATM
这是ASP.NET的文档using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ATM
{
class Bank
{
private List<Account> accounts;
public List<Account> Accounts
{
get { return accounts; }
set { accounts = value; }
}
private int currentAccountNumber;
public int CurrentAccountNumber
{
get { return currentAccountNumber; }
set { currentAccountNumber = value; }
}
public Bank()
{
accounts = new List<Account>();
}
public Account OpenAccount(string password, string confirmationPassword, string name, string personId, string email, int typeOfAccount)
{
Account newAccount;
if (!password.Equals(confirmationPassword))
{
throw new InvalidOperationException("两次密码输入的不一致!");
}
switch (typeOfAccount)
{
case 1: newAccount = new SavingAccount(password, name, personId, email);
break;
case 2: newAccount = new CreditAccount(password, name, personId, email);
break;
default:throw new ArgumentOutOfRangeException("账户类型是1到2之间的整数");
}
accounts.Add(newAccount);
return newAccount;
}
private Account GetAccountByID(long id)
{
foreach (Account account in accounts)
{
if(account.ID==id)
{
return account;
}
}
return null;
}
public Account SignIn(long id, string password)
{
foreach (Account account in accounts)
{
if (account.ID == id && account.Password.Equals(password))
{
return account;
}
}
throw new InvalidOperationException("用户名或者密码不正确,请重试!");
}
public Account Deposit(long id, double sum)
{
Account account = GetAccountByID(id);
if (account != null)
{
account.Deposit(sum);
return account;
}
throw new InvalidOperationException("非法账号!");
}
public Account Withdraw(long id, double sum)
{
Account account = GetAccountByID(id);
if (account != null)
{
account.Withdraw(sum);
return account;
}
throw new InvalidOperationException("非法账号!");
}
public Account SetCeiling(long id, double newCeiling)
{
Account account = GetAccountByID(id);
try
{
(account as CreditAccount).Ceiling = newCeiling;
return account;
}
catch (Exception ex)
{
throw new InvalidOperationException("此账户不是信用账户!");
}
throw new InvalidOperationException("非法账号!");
}
public double GetTotalBalance()
{
double totalBalance = 0;
foreach (Account account in accounts)
{
totalBalance += account.Balance;
}
return totalBalance;
}
public double GetTotalCeiling()
{
double totalCeiling = 0;
foreach (Account account in accounts)
{
if (account is CreditAccount)
{
totalCeiling += (account as CreditAccount).Ceiling;
}
}
return totalCeiling;
}
}
}