Developing a university Registration system where students register for admission
For registration process students should contact the university registrar
Registrar pass the student details to the validator for validation and return the control back to registrar.
class Student
{
String missionId;
String name;
int age;
public Student()
{
name = null;
age = 0;
System.out.println("Student begin to regist");
}
public Student(String s, int i)
{
name = s;
age = i;
}
public void getMissionId()
{
Registrar r = new Registrar();
missionId = r.getMissionId(this);
}
}
class Registrar
{
private static int id = 0;
public Registrar()
{
System.out.println("Registrar is begin now");
}
public String getMissionId(Student s)
{
Validator v = new Validator();
if(v.missionId(s))
{
id++;
}
String missionId = "S000"+id;
return missionId;
}
}
class Validator
{
public Validator()
{
System.out.println("Validator is begin now");
}
public boolean missionId(Student s)
{
if (s.age<18)
return false;
return true;
}
}
public class UniversityRegistation {
/** Creates a new instance of UniversityRegistation */
public UniversityRegistation() {
System.out.println("The system is working now");
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Student s = new Student("bobo",26);
s.getMissionId();
System.out.println(s.name+" "+s.age+" "+s.missionId);
}
}
分享到:
相关推荐
oob-vim是Vim, , 和一组配置。 它使Vim可以在类似Unix的系统中使用,甚至可以在Windows(未经测试)上使用。 安装 手动安装 从github克隆Git Repo git clone git://github.com/zer4tul/oob-vim.git ~/.oob-vim ...
OOB-Sample-App 包含用于演示如何在 aml 中使用 OOB 标签的简单 android 应用程序的 java 和 xml
emacs-oob-reboot:该项目通过提供核心友好的更改来振兴Emacs,以改善现成的体验
MacOS / iOS内核necp_client_action OOB写入漏洞 necp_client_action是系统调用SYS_necp_client_action的处理程序。 在此函数内部,当操作为NECP_CLIENT_ACTION_UPDATE_CACHE时,将调用necp_client_update_cache。 ...
测试驱动开发简介在此作业中,我们将为目录应用程序构建测试。 除测试外的所有代码均已为您编写。任务您的目标是编写测试,以声明服务器的输出,该服务器提供JSON文件中的列表数据。 为此,您将: 使用讨论演示文稿...
OOB / N1是一个PHP5框架。 它的意思是无需修改即可在IIS / Apache和Win / Linux环境下工作。 该框架不是简单的Template / DB包,而是开发PHP应用程序的完整引擎。
涡轮运行后,在hystrix仪表盘中使用这个url:
oracle管理软件OOB
网络编程从大的方面说就是对信息的发送到接收,中间传输为物理线路的作用。网络编程最主要的工作就是在发送端把信息通过规定好的协议进行组装包,在接收端按照规定好的协议把包进行解析,从而提取出对应的信息,达到...
230OOB 一个通过FTP实现文件读取的python脚本
当网络出现故障时,可以通过OOB Modem拨入并登录进相关的网络设备。
针对土壤含水率对X射线荧光光谱(XRF)法检测结果存在严重干扰的问题,提出了一种基于灰狼优化(GWO)算法的支持向量回归(SVR)校正预测模型。完成光谱数据预处理之后,基于GWO-SVR建立净峰面积、含水率与镉元素含量之间的...
其中包含BOOT.BIN,devicetree_ramdisk.dtb,zImage。
Silverlight 客戶端桌面模式(OOB 模式) 事例
本文首先介绍了什么是OOB 以及OOB的安装 卸载 和怎么 调试OOB 与COM 的相互操作 和 office 之间的交互..........
Oracle的客户端工具比PLSQL简单好用.
手把手带你利用SQLmap结合OOB技术实现音速盲注 文档来自互联网收集,仅做学习使用,禁止进行违法活动。
Silverlight OOB应用源码,包含OOB自定义窗口组件开发和安装、升级等。
串行传输协议sata的物理层的控制模块的状态机
This zip file contains the Out Of Box (OOB) SD card image and source. Documentation on how to obtain and build the Linux Kernel along with the hardware project and boot files is provided.