Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SENG330/ex7_starter

Repository files navigation

Please read thru the overall exercises overview.

Exercise 7

In this exercise you will explore the benefits and limitations of inheritance-flavoured OOP and concurrency in Java.

  1. I've created a shared data structure, Points, in the src folder. Use Java's concurrency API to implement access to this shared data structure.
    • Change the code in Driver.java so that the 3 clients run in three threads incrementing the points total and displaying the total points. Confirm that the results are stochastic, i.e., they change each time the code is run.
    • Then change this code to fix this with the concurrency API as discussed in videos/lectures. The result should be that the correct total is printed independent of thread execution.
  2. Examine the concurrency approach used in either Scala, Erlang, or Go, and write a 1 page markdown file describing the pros and cons of ONE concurrency primitive in that language vs the Java equivalent. Remember to properly cite your references used (e.g., the Scala website, blog posts, academic papers).
  3. Run PMD, a static analyzer, and find 3 code smells in your Ex 5 source code. If your code is already super clean, make some smelly code to get the detector to work.

Learning Objectives

  • types and inheritance
  • concurrency and its mechanisms in Java and other languages
  • static analysis tools and refactoring

Deliverables

  • No ADR necessary unless specific design decisions should be explained to the TA.
  • the 1 page (750 words max) compare and contrast file. I've created the skeleton for this file already as contrast.md.
  • a markdown file with Github links to the 6 refactoring related commits (use refactoring.md).
  • a markdown file (concurrency.md) with the 2 concurrency related commits.

Tips

Due

  • We will mark the last commit made before Nov 8 at 11:59pm. If that last commit was a mess, let us know. Make sure your code compiles!
  • By midnight Nov 11, submit your team peer review form via the webapp (link omitted to prevent spam).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages