辅导EE5805留学生程序、 写作Programming课程程序

” 辅导EE5805留学生程序、 写作Programming课程程序EE5805 Java Network ProgrammingTest 1, 2019/20 Summer TermQuestion 1. (30 marks)The simple substitution cipher is a cipher that has been in use for hundreds of years. It basically consistsof substituting every plaintext character for a different ciphertext character. The alphabet set is simplifiedto contain only the space character, comma, full-stop, digits (0-9), uppercase letters (A-Z) and lowercaseletters (a-z).alphabets = { ,.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}key = {9fj,.6SpC57aeU VJ4Z0ybLXTx2guqI3Hwtin8GQNP1KFRklEzdrvocWsDhBAMmYO}You can see from the given key that is substituted by 9 , is substituted by f . is substituted by j 0 is substituted by , 1 is substituted by . 2 is substituted by 6 and so on.a) [20 marks] Implement the methods encrypt(String key, String text) and decrypt(String key, Stringcipher) in the class Q1.java.b) [10 marks] Create a test class Q1Test.java with two test cases for the two methods in part (a) usingJUnit. For encryption:key: 9fj,.6SpC57aeU VJ4Z0ybLXTx2guqI3Hwtin8GQNP1KFRklEzdrvocWsDhBAMmYOtext: Cheers, you Will see this message if your program is correct.expected result: VkKKsDf9YoB9Mldd9DKK9hklD9rKDDQRK9lF9YoBs9csoRsQr9lD9PossKPhj For decryption: 辅导EE5805留学生作业、 写作Programming课程作业key: 9fj,.6SpC57aeU VJ4Z0ybLXTx2guqI3Hwtin8GQNP1KFRklEzdrvocWsDhBAMmYOcipher: VkKKsDf9YoB9Mldd9DKK9hklD9rKDDQRK9lF9YoBs9csoRsQr9lD9PossKPhjexpected result: Cheers, you will see this message if your program is correct.Question 2. (40 marks)A video content provider maintains a daily log of the clients streaming requests. The streaming requestsare stored in a file (video_data.txt) with one request per line. Each streaming request contains thefollowing three fields separated by commas: a timestamp (represented by a long integer), a video ID (a string), and a clients IP address.Write a Java Program to find the top 5 most active clients from the log file, i.e. the five IP addresses withthe highest view count.Implement the methods ReadDataFile(String filename) and findTop5Clients(ListVideoRecord list) in theclass Q2.java. The specification of the methods is written in the comment section.The expected program output is as follow:END OF PAPER如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导