服务器使用以下服务器和客户端结构, 编写一个储存考试结果的共享

储存服务器  时间:2021-05-03  阅读:()

使用以下服务器和客户端结构 编写一个储存考试结果的共享服务器。 服务器有所有给出科目的学生的考试结果。每个学生有单独I D 学生号和mark(分数 。 服务器需要可以让老师登录然后输入每个学生的分数。服务器管理所有的老师的登录名和密码和学生ID。

服务器需要允许多个老师同时登录。importjava. io.*;*importjava.net. ;class…Server {final static int portSqrt=1234; //any number>1024publ icstatic void main(String[]args) {

Screen.message("Server running . . .");try{

ServerSocket servesock=new ServerSocket(portSqrt);

//for service requests on port portSqrtwhi le(true) {

//wait for a service request on port portSqrt

Socket socket=servesock.accept();

//start thread to service request

(new Thread(new ThreadName(socket))).start();

}

}catch(IOException e) {}

}

}importjava. io.*;*importjava.net. ;class. .Cl ient {private final static i nt port=1234;publ icstatic void main(String[]args) {try{

Socket socket;socke=t=new Socket(InetAddress.getLocalHost(),portSqrt);

…in new…(socket.getInputStream());

…out=new…(socket.getOutp utStream());

//use out to send data

//use in to get reply

//process replysocket.close();

}catch(IOException e) {System.out.pri ntln(e);}

}

}

-------------------------------------------------------------------------------------------------------

Using the client server architecture developed in the lecture course,write a server thatprovides access to a shared collection of examination results. The server holds theresults for all students in a given course.Each student has an id number and a mark.When a student logs on they enter their id number and the server returns the mark forthe examination. It should be possible for a lecturer to log on and enter marks forstudents.The server maintains a list of lecturers and their passwords and also a list ofstudent id numbers. It is important to remember that multiple lecturers may enterresults at the same time.

Puaex:香港vds,wtt套餐,G口带宽不限流量;可解流媒体,限量补货

puaex怎么样?puaex是一家去年成立的国人商家,本站也分享过几次,他家主要销售香港商宽的套餐,给的全部为G口带宽,而且是不限流量的,目前有WTT和HKBN两种线路的方面,虽然商家的价格比较贵,但是每次补一些货,就会被抢空,之前一直都是断货的状态,目前商家进行了补货,有需要这种类型机器的朋友可以入手。点击进入:puaex商家官方网站Puaex香港vds套餐:全部为KVM虚拟架构,G口的带宽,可...

日本CN2、香港CTG(150元/月) E5 2650 16G内存 20M CN2带宽 1T硬盘

提速啦简单介绍下提速啦 是成立于2012年的IDC老兵 长期以来是很多入门级IDC用户的必选商家 便宜 稳定 廉价 是你创业分销的不二之选,目前市场上很多的商家都是从提速啦拿货然后去分销的。提速啦最新物理机活动 爆炸便宜的香港CN2物理服务器 和 日本CN2物理服务器香港CTG E5 2650 16G内存 20M CN2带宽 1T硬盘 150元/月日本CN2 E5 2650 16G内存 20M C...

PhotonVPS:$4/月,KVM-2GB/30GB/2TB/洛杉矶&达拉斯&芝加哥等

很久没有分享PhotonVPS的消息,最近看到商家VPS主机套餐有一些更新所以分享下。这是一家成立于2008年的国外VPS服务商,Psychz机房旗下的站点,主要提供VPS和独立服务器等,数据中心包括美国洛杉矶、达拉斯、芝加哥、阿什本等。目前,商家针对Cloud VPS提供8折优惠码,优惠后最低2G内存套餐每月4美元起。下面列出几款主机配置信息。CPU:1core内存:2GB硬盘:30GB NVm...

储存服务器为你推荐
支持ipad支持ipad支持ipad张女士苹果5photoshop技术什么是ps技术重庆宽带测速重庆云阳电信宽带测速网址谁知道,帮个忙?iphone连不上wifi为什么苹果手机连不上wifi微信都发不出去?迅雷快鸟迅雷快鸟支持移动宽带提速吗win7还原系统win7怎么初始化系统?系统还原?联通合约机iphone5联通合约机iphone5能用移动卡吗
备案域名 域名到期查询 游戏服务器租用 淘宝抢红包攻略 国外永久服务器 大硬盘 电影服务器 cve-2014-6271 godaddy支付宝 光棍节日志 正版win8.1升级win10 全能主机 福建天翼加速 免费个人空间申请 免空 速度云 cdn加速原理 qq云端 idc查询 万网空间购买 更多