COMPUTER NETWORKS-SWE2002 XXXXXXXXXXLAB ASSESSMENT-01 NAME: A HEMANTH REG NO: 21MIS0094 1. Implement date server and client in python using TCP sockets. The client will request the server to send the...

https://www.chegg.com/homework-help/questions-and-answers/create-class-named-square-contains-data-fields-length-width-unceacen-und-method-named-comp-q4085902


COMPUTER NETWORKS-SWE2002 LAB ASSESSMENT-01 NAME: A HEMANTH REG NO: 21MIS0094 1. Implement date server and client in python using TCP sockets. The client will request the server to send the today’s date and server will send in dd/mm/yyyy format. SERVER: import socket from datetime import date s=socket.socket() host=socket.gethostname() port=12345 s.bind((host,port)) s.listen(5) today=date.today() strftime=today.strftime("%d/%m/%y") while True: c,addr=s.accept() c.send(strftime) c.close() CLIENT: import socket s=socket.socket() host=socket.gethostname() port=12345 s.connect((host,port)) print s.recv(1024) s.close() OUTPUT: 2. Write a client-server program, where the client will send a six digit number to the server and the server will add the first, third and fifth position values and the result will be sent back to the client. SERVER: import socket s=socket.socket() host=socket.gethostname() port=12345 s.bind((host,port)) s.listen(5) while True: c,addr=s.accept() s_num=c.recv(1024) total=int(s_num[0])+int(s_num[2])+int(s_num[4]) c.send(str(total)) c.close() CLIENT: import socket s=socket.socket() host=socket.gethostname() port=12345 s.connect((host,port)) s.send(str(input("Enter 6 digit number:"))) print s.recv(1024) s.close() OUTPUT: 3. Write a program to implement a chat server and client in python using TCP sockets. SERVER: import socket s=socket.socket() host=socket.gethostname() port=12345 s.bind((host,port)) s.listen(5) while True: c,addr=s.accept() print('Got connection from:',addr) reply=raw_input("you:") c.send(reply) gi=c.recv(1024) if gi=='bye': break else: print gi c.close() CLIENT: import socket while True: s=socket.socket() host=socket.gethostname() port=12345 s.connect((host,port)) rep=s.recv(1024) if rep=='bye': break else: print rep st=raw_input('you:') s.send(st) s.close() OUTPUT: 4. The message entered in the client is sent to the server and the server encodes the message and returns it to the client. Encoding is done by replacing a character by the character next to it ( i.e. a as b, b as c...z as a). This process is done using the TCP/IP protocol. Write a Java program for the above. SERVER: import socket s=socket.socket() host=socket.gethostname() port=12345 s.bind((host,port)) s.listen(5) while True: c,addr=s.accept() msg=c.recv(1024) encMsg='' for i in msg: encMsg+=chr(ord(i)+1) c.send(encMsg) CLIENT: import socket s=socket.socket() host=socket.gethostname() port=12345 s.connect((host,port)) s.send(raw_input("enter input: ")) print("encoded string is: "+s.recv(1024)) OUTPUT: 5. A student wants to update his name in the register. He sends his request to his master specifying his first name and last name. Help the master to concatenate the names and update the same in the register. Display the updated name along with the number of vowels presented in the name and length of the updated name. Write a client-server TCP program for the same. SERVER: import socket s=socket.socket() host=socket.gethostname() port=12345 s.bind((host,port)) s.listen(5) while True: c,addr=s.accept() fn=c.recv(1024) ln=c.recv(1024) tn=fn+ln l=list(tn) vowels={'a','e','i','o','u'} c=0 length=len(tn) print tn for i in tn: if i in vowels: c=c+1 print('no of vowels=') print c print('length of name=') print length CLIENT: import socket s=socket.socket() host=socket.gethostname() port=12345 s.connect((host,port)) print('Enter first name') fn=raw_input('') print('Enter middle name') ln=raw_input('') s.send(fn) s.send(ln) OUTPUT: Criminal Face Identification System INDEX 1. Abstract 2. Introduction 3. System Analysis a. Existing System b. proposed System 4. Feasibility Report a. Technical Feasibility b. Operational Feasibility c. Economical Feasibility 5. System Requirement Specification Document a. Modules Description b. Process Flow c. SDLC Methodology d. Software Requirements e. Hardware Requirements 6. System Design A.E-R Diagram b. DFD c. UML 7. Technology Description 8. Coding 9. Testing & Debugging Techniques 10. Output Screens 11. Future Enhancements 12. Bibliography ABSTRACT: Title: Criminal Face Identification System Objective: Criminal record generally contains personal information about particular person along with photograph. To identify any Criminal we need some identification regarding person, which are given by eyewitness. In most cases the quality and resolution of the recorded image segments is poor and hard to identify a face. To overcome this sort of problem we are developing software. Identification can be done in many ways like finger print, eyes, DNA etc. One of the applications is face identification. The face is our primary focus of attention in social inters course playing a major role in conveying identify and emotion. Although the ability to infer intelligence or character from facial appearance is suspect, the human ability to recognize face is remarkable. INTRODUCTION PURPOSE OF THE PROJECT: This project is aimed to identify the criminals in any investigation department. Here the technique is we already store some images of the criminals in our database along with his details and that images are segmented into many slices say eyes, hairs, lips, nose, etc. These images are again stored in another database record so to identify any criminals; eyewitnesses will see the images or slices that appear on the screen by using it we develop the face, which may or may not be matched with our images. If any image is matched up to 99% then we predict that he is only the criminal. Thus using this project it provides a very friendly environment for both operator and eyewitness to easily design any face can identify criminals very easy. PROJECT OBJECTIVE: This project is intended to identify a person using the images previously taken. The identification will be done according the previous images of different persons. PROJECT SCOPE: The scope of the project is confined to store the image and store in the database. When a person has to be identified the images stored in the database are compared with the existing details. OVERVIEW OF THE PROJECT: This project is aimed to identify the criminals in any investigation department. Here the technique is we already store some images of the criminals in our database along with his details and those images are segmented into many slices say eyes, hairs, lips, nose, etc. These images are again stored in another database record so to identify any criminals; eyewitnesses will see the images or slices that appear on the screen by using it we develop the face, which may or may not be matched with our images. If any image is matched up to 99% then we predict that he is only the criminal. Thus using this project it provides a very friendly environment for both operator and eyewitness to easily design any face can identify criminals very easy. PROBLEM AREA DESCRIPTION The project is aimed at identifying the criminals with the help of eye witness. There are mainly four modules in our project. They are Adding, Deleting, Updating and identifying the criminals. There are mainly three roles in our project. They are: · Administrator · Operator · Eyewitness The administrator is responsible for providing User id’s and passwords. He provides authentication to the users. He creates deletes and Updates the User ids and Passwords. The operator, who belongs to the investigating department, is responsible for entering the criminal details and maintains them. He adds, deletes and updates the criminal details. He also constructs the criminal face with the help of eye witness. The eyewitness identifies the criminals with the help of cropped parts stored in a different database by the operator. The eyewitness selects a cropped part from the database and that cropped part will be freeze by the operator in this way, complete face of the criminal is constructed and the details of that criminal is retrieved from the database. We can also construct a new image from those cropped parts which we consider as an imaginary face of the criminal. SYSTEM ANALYSIS The first step in developing anything is to state the requirements. This applies just as much to leading edge research as to simple programs and to personal programs, as well as to large team efforts. Being vague about your objective only postpones decisions to a later stage where changes are much more costly. The problem statement should state what is to be done and not how it is to be done. It should be a statement of needs, not a proposal for a solution. A user manual for the desired system is a good problem statement. The requestor should indicate which features are mandatory and which are optional, to avoid overly constraining design decisions. The requestor should avoid describing system internals, as this restricts implementation flexibility. Performance specifications and protocols for interaction with external systems are legitimate requirements. Software engineering standards, such as modular construction, design for testability, and provision for future extensions, are also proper. Many problems statements, from individuals, companies, and government agencies, mixture requirements with design decisions. There may sometimes be a compelling reason to require a particular computer or language; there is rarely justification to specify the use of a particular algorithm
Sep 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here