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

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

TmhHost 全场八折优惠且充值返10% 多款CN2线路

TmhHost 商家是一家成立于2019年的国人主机品牌。目前主营的是美国VPS以及美国、香港、韩国、菲律宾的独立服务器等,其中VPS业务涵盖香港CN2、香港NTT、美国CN2回程高防、美国CN2 GIA、日本软银、韩国cn2等,均为亚太中国直连优质线路,TmhHost提供全中文界面,支持支付宝付款。 TmhHost黑五优惠活动发布了,全场云服务器、独立服务器提供8折,另有充值返现、特价服务器促销...

易探云香港云服务器价格多少钱1个月/1年?

易探云怎么样?易探云是目前国内少数优质的香港云服务器服务商家,目前推出多个香港机房的香港云服务器,有新界、九龙、沙田、葵湾等机房,还提供CN2、BGP及CN2三网直连香港云服务器。近年来,许多企业外贸出海会选择香港云服务器来部署自己的外贸网站,使得越来越多的用户会选择易探云作为网站服务提供平台。今天,云服务器网(yuntue.com)小编来谈谈易探云和易探云服务器怎么样?具体香港云服务器多少钱1个...

小欢互联19元/月起, 即日起至10月底 美国CERA 促销活动 美国/香港八折

小欢互联成立于2019年10月,主打海外高性价比云服务器、CDN和虚拟主机服务。近期上线了自营美国CERA机房高速VPS,进行促销活动,为客户奉上美国/香港八折优惠码:Xxc1mtLB优惠码适用于美国CERA一区/二区以及香港一区/二区优惠时间:即日起至10月底优惠码可无限次使用,且续费同价!官网:https://idc.xh-ws.com购买地址:美国CERA一区:https://idc.xh-...

储存服务器为你推荐
伺服器win7支持ipad支持ipad特斯拉苹果5netbios端口怎么关闭8909端口!其他端口就不用了勒索病毒win7补丁求问win7 64位旗舰版怎么预防勒索病毒ipadwifiIPAD连上了WIFI,但是无法上网,急!!fusionchartsfusioncharts怎么生成图片至excelcanvas2Canvas ~セピア色のモチーフ~ 这个动画片的中文翻译是什么?从哪看?360chrome360浏览器和谷歌chrome比哪个好用
国外虚拟主机 抗投诉vps主机 如何查询ip地址 国外永久服务器 a2hosting godaddy优惠码 域名优惠码 轻博客 双11抢红包攻略 seovip 线路工具 免费静态空间 圣诞节促销 bgp双线 中国电信测网速 qq对话框 爱奇艺vip免费领取 免费网络 中国联通宽带测速 1美元 更多