EE5805课程程序 写作、Java程序设计程序调试

” EE5805课程程序 写作、Java程序设计程序调试EE5805 Java Network ProgrammingTest 2, 2019/20 Summer TermQuestion 1. (30 marks)Write a multithreaded program to estimate the PI value using the Eulers formula shown below.You are asked to compute the first 500,000,000 terms of the series using the Fork-Join Framework. Eachsubtask should Compute no more than 10,000 terms.Name your main class Q1.java.Your main method should measure the elapsed time and compute the difference between Math.PI andthe approximated PI value. Format the output as shown below.Question 2. (30 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 addressWrite a Java program to find out the top 5 most active clients in the log, i.e. the 5 IP addresses with thehighest view count.Implement The methods findTop5Clients(ListVideoRecord list) in the class Q2.java. You are required touse Stream API to create one single processing pipeline only. Any imperative approaches are consideredinvalid and will receive no marks. 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在线指导