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

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

buyvm迈阿密机房VPS国内首发测评,高性能平台:AMD Ryzen 9 3900x+DDR4+NVMe+1Gbps带宽不限流量

buyvm的第四个数据中心上线了,位于美国东南沿海的迈阿密市。迈阿密的VPS依旧和buyvm其他机房的一样,KVM虚拟,Ryzen 9 3900x、DDR4、NVMe、1Gbps带宽、不限流量。目前还没有看见buyvm上架迈阿密的block storage,估计不久也会有的。 官方网站:https://my.frantech.ca/cart.php?gid=48 加密货币、信用卡、PayPal、...

阿里云金秋上云季,云服务器秒杀2C2G5M年付60元起

阿里云(aliyun)在这个月又推出了一个金秋上云季活动,到9月30日前,每天两场秒杀活动,包括轻量应用服务器、云服务器、云数据库、短信包、存储包、CDN流量包等等产品,其中Aliyun轻量云服务器最低60元/年起,还可以99元续费3次!活动针对新用户和没有购买过他们的产品的老用户均可参与,每人限购1件。关于阿里云不用多说了,国内首屈一指的云服务器商家,无论建站还是学习都是相当靠谱的。活动地址:h...

MineServer:洛杉矶CN2 GIA VPS/512MB内存/20GB NVME/800GB流量/200Mbps/KVM,58元/季

mineserver怎么样?mineserver是一家国人商家,主要提供香港CN2 KVM VPS、香港CMI KVM VPS、日本CN2 KVM VPS、洛杉矶cn2 gia端口转发等服务,之前介绍过几次,最近比较活跃。这家新推出了洛杉矶CN2 GIA VPS,512MB内存/20GB NVME/800GB流量/200Mbps/KVM,58元/季,并且进行了带宽升级,同时IP更改为美国IP。点击...

储存服务器为你推荐
中国微信5政协晋城市委员会主办practicescss仪器win7支持ipad支持ipad支持ipadnetbios端口怎么关闭8909端口!其他端口就不用了ipad如何上网ipad如何允许app使用网络googleadsense10分钟申请Google Adsense是一种怎样的体验
云南虚拟主机 提供香港vps 中文域名交易中心 万网域名管理 lnmp enzu ubuntu更新源 tk域名 一点优惠网 网站cdn加速 卡巴斯基是免费的吗 美国凤凰城 个人免费邮箱 测速电信 阿里云个人邮箱 免备案jsp空间 winds windowsserver2008r2 标准机柜 windowsserverr2 更多