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

储存服务器  时间: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.

Virmach($7.2/年)特价机器发放

在八月份的时候有分享到 Virmach 暑期的促销活动有低至年付12美元的便宜VPS主机,这不开学季商家又发布五款年付VPS主机方案,而且是有可以选择七个数据中心。如果我们有需要低价年付便宜VPS主机的可以选择,且最低年付7.2美元(这款目前已经缺货)。这里需要注意的,这次发布的几款便宜年付方案,会在2021年9月30日或者2022年4月39日,分两个时间段会将INTEL CPU迁移至AMD CP...

€4.99/月Contabo云服务器,美国高性价比VPS/4核8G内存200G SSD存储

Contabo是一家运营了20多年的欧洲老牌主机商,之前主要是运营德国数据中心,Contabo在今年4月份增设新加坡数据中心,近期同时新增了美国纽约和西雅图数据中心。全球布局基本完成,目前可选的数据中心包括:德国本土、美国东部(纽约)、美国西部(西雅图)、美国中部(圣路易斯)和亚洲的新加坡数据中心。Contabo的之前国外主机测评网站有多次介绍,他们家的特点就是性价比高,而且这个高不是一般的高,是...

美国云服务器 1核 1G 100M 10G防御 39元/月 物语云计算

物语云计算(MonogatariCloud)是一家成立于2016年的老牌国人商家,主营国内游戏高防独服业务,拥有多家机房资源,产品质量过硬,颇有一定口碑。本次带来的是美国圣何塞 Equinix 机房的高性能I9-10980XE大带宽VPS,去程CN2GIA回程AS9929,美国原生IP,支持解锁奈飞等应用,支持免费安装Windows系统。值得注意的是,物语云采用的虚拟化技术为Hyper-V,资源全...

储存服务器为你推荐
支出127computationgraphhttp://www.paper.edu.cn支持ipad请仔细阅读在本报告尾部的重要法律声明《个人收入的分配过关检测》win7关闭445端口win7系统怎么关闭445和135这两个端口ipad如何上网ipad怎么设置网络?google中国地图谷歌中国地图用的是什么投影,什么坐标系win7还原系统win7怎么初始化系统?系统还原?
域名网 tk域名注册 directspace 主机合租 北京主机 qq数据库下载 e蜗 idc是什么 泉州电信 服务器监测 申请免费空间和域名 七夕快乐英语 贵阳电信测速 华为云建站 注册阿里云邮箱 摩尔庄园注册 学生服务器 网络速度 时间服务器 cx域名 更多