首页 > > 详细

EE5805课程作业代做、Java程序设计作业调试、Java语言作业代写、Network Programming作业代做 帮做Haskell程序|代写留学生Pr

EE5805 Java Network Programming
Test 2, 2019/20 Summer Term
Question 1. (30 marks)
Write a multithreaded program to estimate the PI value using the Euler’s formula shown below.
You are asked to compute the first 500,000,000 terms of the series using the Fork-Join Framework. Each
subtask 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 and
the 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 requests
are stored in a file (video_data.txt) with one request per line. Each streaming request contains the
following three fields separated by commas:
• a timestamp (represented by a long integer),
• a video ID (a string), and
• a client’s IP address
Write a Java program to find out the top 5 most active clients in the log, i.e. the 5 IP addresses with the
highest view count.
Implement the methods findTop5Clients(List list) in the class Q2.java. You are required to
use Stream API to create one single processing pipeline only. Any imperative approaches are considered
invalid 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
  • 工作时间:8:00-23:00
  • 微信:codinghelp
热点文章
程序代写更多图片

联系我们 - QQ: 99515681 微信:codinghelp
© 2014 www.7daixie.com
程序代写网!