, , , ,

[SOLVED] Assignment 4 Assessing Maintainability Java

$25

File Name: Assignment_4_Assessing_Maintainability_Java.zip
File Size: 405.06 KB

5/5 - (1 vote)

Assignment 4: Assessing Maintainability

Overview

The goal of this assignment is to review two different implementations of Kalah Links to an external site., following the code review process as discussed in class. You must submit your comments on GitHub, and complete a Canvas quiz.

Resources

The two implementations are in this file: . Unzip the file before you start the following actions.

The archive file contains two implementations: Design Blue and Design Green (hereafter referred to as “Blue” and “Green”). For each design, there is:

src — contains the Java source code for the implementation, organised the same as for the other assignments. Note that information identifying the developer of the implementation has been replaced by something like “?????????”. That is the only change from the original submission.

METADATA — provides measurements and results of other analysis for the implementation. This information may be useful. However, there is no need to use it, and be aware that there may be the occasional accuracy problem. Note that the files with the suffix .tsv are formatted tab-separated.

Deliverables

You are to review two Java implementations of Kalah, and comment on aspects of maintainability of each implementation. Your reviews are to be provided by Github Pull Request comments (see below) and reports for each implementation by providing answers to the Canvas quiz.

Submission

You submit by completing the quiz and ensuring your GitHub Classroom repository is up to-date. We will download your repository for marking on the due date.

You provide your report by answering the questions in the Canvas ungraded surveys for the implementations.

Late submissions are not permitted.

Actions

Note that these instructions use different design IDs than what you will be using for the assignment. Substitute the design IDs for what you have been given (design1000 for Blue and design1038 for Green) in what is below.

1. Accept the GitHub classroom Invite (above) for Assignment 4.

2. On GitHub, using the Add file drop-down, click upload files.

3. Drag and drop the design####-blue folder directly to upload to your repository.

4. After you have dragged and dropped the design####-blue folder, you should see something similar to the following on screen:

5. Under Commit changes, do the following:

a. Enter a meaningful message as the commit message. A meaningful message could be “Commit Kalah design ####”.

b. Choose create a new branch for your commit and then create a pull request. Name the new branch “<upi>-design####-blue” (replace <upi> with your UPI/username and #### with the given design ID).

c. Click Propose changes.

6. GitHub will direct you to Open a pull request. On this page, rename the pull request to “<UPI>-design####-blue” (replace <UPI> with your UPI/username and #### with the given design ID) and click Create pull request.

7. You should see something similar to the following in your pull request.

8. Repeat Step 2 ~ 6 for design####-green. You should upload the code on a new branch “upi-design####-green” and create a new pull request with the name “UPI-design####-green”.

9. You should have 2 new branches, excluding the main branch, and 2 pull requests for this assignment.

Making Comments in a Pull Request

1. Under your repository, click Pull requests. Then, select the pull request you would like to review.

2. On the pull request, click Files changed.

3. You can start adding comments on a single line of code or on multiple lines.

4. Click Start a review to add comments. You can Add review comment if you have already started the review.

Any comments you made in the review will be pending until you Submit review. To submit your review, go to Finish your review on the top right hand corner.

5. Alternatively, you can Add a single comment. The comment will be posted immediately.

6. Make sure you do not have any pending comments before the due date.

7. Make sure you have answered all the questions on Canvas and made comments in the pull request for the explanation. To find the link for each comment, go to Conversation in the pull request. On the top right hand corner of each comment, choose Copy link. Similarly, you can find the link for each comment under Files changed.

For more information on how to comment in a pull request on GitHub, see Starting a review.

IMPORTANT

NEVER commit any implementations of Kalah to the main branch.

DO NOT merge your pull requests to the base branch, i.e. the main branch for this assignment.

You do not need to close the pull requests.

Assessment

This assignment covers many of the aspects of Maintainability discussed in the course. Your answers will be assessed according to the level of understanding of these aspects they show.

Report

The report that you should complete is available here. Note: In these questions “type” refers to any class, interface, or enum.

In evaluating the maintainability of the implementations, you may want to consider the following Change Cases (but you are of course allowed to consider other change cases you think of). You do not need to answer any questions about these change cases, but they may help guide your review of the implementations.

PNM Player name. Change the names of the players: from “Player 1” to “First Player”, “player 1” to “first player”, “Player 2” to “Second Player”, and “player 2” to “second player”.

CNM Choose (Player) Name. Allow the players to choose their names. The names are displayed on the left immediately above the board for Player 2, and on the right immediately below the board.

NHS Number houses. At the beginning of the game, the players can choose how many houses there are.

CID Command ID. Change quit command something else (e.g. “Q”)

PLB Player Label. Change it to something else, such as “PL1” and “PL2”.

NSD Number of Seeds. Allow the players to specify the initial number of seeds in the houses, up to 99.

DIR Direction of sowing. Change the direction that seeds are sown from anti-clockwise to clockwise.

Question 1

Evaluate implementa!on Blue’s representa!on of the context schema concept of player. That is, how well does the implementa!on provide the behaviour of player as described in the requirements.

Provide the link to the GitHub Pull Request comment that discusses how well this concept are represented in the implementa!on.

You should only make 1 (ONE) comment and it should be a”ached to the most useful point in the code to support your answer.

Question 2

Evaluate implementation Green’s representa!on of the context schema concept of player. That is, how well does the implementa!on provide the behaviour of player as described in the requirements.

Provide the link to the GitHub Pull Request comment that discusses how well this concept are represented in the implementa!on.

You should only make 1 (ONE) comment and it should be a”ached to the most useful point in the code to support your answer.

Question 3

There is at least one concept from the context schema that is missing from implementa!on Blue, that is, there is no explicit representation of that concept in the implementa!on.

Provide the link to the GitHub Pull Request comment that identifies and describes one such missing concept (1 sentence should be sufficient).

You should only make 1 (ONE) comment and it should be a”ached to the location where the relevant information is provided (if there is more than one such location just pick one of them).

Question 4

There is at least one concept from the context schema that is missing from implementa!on Green, that is, there is no explicit representation of that concept in the implementa!on.

Provide the link to the GitHub Pull Request comment that iden!fies and describes one such missing concept (1 sentence should be sufficient).

You should only make 1 (ONE) comment and it should be a”ached to the loca!on where the relevant information is provided (if there is more than one such location just pick one of them).

Question 5

We know we should use meaningful names, but we also know it can be difficult to find exactly the right name. Consequently there will almost always be a poor name.

Provide a link to a GitHub Pull Request comment that identifies 1 (ONE) name in implementation Blue that was not the best choice and explains what the problem is with that name. The name can be for anything, including methods, fields, and variables.

You should a”ach the comment to the declaration of the name.

Question 6

We know we should use meaningful names, but we also know it can be difficult to find exactly the right name. Consequently there will almost always be a poor name.

Provide a link to a GitHub Pull Request comment that identifies 1 (ONE) name in implementation Green that was not the best choice and explains what the problem is with that name. The name can be for anything, including methods, fields, and variables.

You should comment on the declaration of the name.

Question 7

Provide a link to a GitHub Pull Request comment that proposes and justifies a be”er name than the poor one you have identified in the previous question for implementation Blue

You should add a new Pull Request comment to the same location as you made the comment for the previous question (that is, there should be two separate Pull Request comments for that declaration).

Question 8

Provide a link to a GitHub Pull Request comment that proposes and justifies a be”er name than the poor one you have identified in the previous ques!on for implementation Green

You should add a new Pull Request comment to the same location as you made the comment for the previous ques!on (that is, there should be two separate Pull Request comments for that declaration).

Question 9

For implementa!on Blue, iden!fy all the places where an inheritance relationship is created, that is, where one class (or interface) extends another class (or interface) or implements an interface.

You should make a GitHub Pull Request comment for each inheritance relationship a”ached to the relevant keyword (extends or implements). The comment should indicate what the parent type is and what the child type is.

Provide the link to each such comment (i.e. one link per inheritance rela!onship).

Question 10

For implementation Green, identify all the places where an inheritance rela!onship is created, that is, where one class (or interface) extends another class (or interface) or implements an interface.

You should make a GitHub Pull Request comment for each inheritance relationship a”ached to the relevant keyword (extends or implements). The comment should indicate what the parent type is and what the child type is.

Provide the link to each such comment (i.e. one link per inheritance rela!onship).

Question 11

For each inheritance relationship in implementation Blue listed in the previous question for this implementation, identify all the places where the child type is used unchanged where the parent type is expected, that is, a substitution takes place. Provide a GitHub Pull Request comment at the point where the use takes place.

Provide a link to each such comment (i.e. one link per inheritance use). If no substitution takes place, the comment should read “NONE”.

Question 12

For each inheritance rela!onship in implementa!on Green listed in the previous question for this implementa!on, identify all the places where the child type is used unchanged where the parent type is expected, that is, a substitution takes place. Provide a GitHub Pull Request comment at the point where the use takes place.

Provide a link to each such comment (i.e. one link per inheritance use). If no subs!tu!on takes place, the comment should read “NONE”.

Question 13

Provide a link to a GitHub Pull Request comment that identifies one type where implementation Blue does not follow SRP. Your comment should explain why SRP is not followed. If there is more than one type just pick one.

Question 14

Provide a link to a GitHub Pull Request comment that identifies one type where implementation Green does not follow SRP. Your comment should explain why SRP is not followed. If there is more than one type just pick one.

Question 15

Provide a link to a GitHub Pull Request comment that iden!fies one location where implementation Blue does not follow LSP. Your comment should explain why LSP is not followed. If there is more than one location just pick one.

Question 16

Provide a link to a GitHub Pull Request comment that iden!fies one location where implementation Green does not follow LSP. Your comment should explain why LSP is not followed. If there is more than one location just pick one.

Question 17

Briefly discuss what is required to implement the DIR (change direction of sowing, see list at end of assignment description) change case for the Blue implementation. You must give examples from the implementation to justify your answer.

Question 18

Indicate how confident you are in your answer for what is required to implement the DIR change case for Blue. You have high confidence if you think that you have found all the places that will need to change and you do not expect any problems making the changes you have identified.

Low (do not think have found everything)

Medium (think found everything but not sure stated changes will work)

High (found everything and think stated changes will work)

Question 19

Briefly discuss what is required to implement the DIR (change direction of sowing, see list at end of assignment description) change case for the Green implementation. You must give examples from the implementation to justify your answer.

Question 20

Indicate how confident you are in your answer for what is required to implement the DIR change case for Green. You have high confidence if you think that you have found all the places that will need to change and you do not expect any problems making the changes you have identified.

Low (do not think have found everything)

Medium (think found everything but not sure stated changes will work)

High (found everything and think stated changes will work)

Question 21

Decide which of the two implementa!ons is the more maintainable, that is, of the implementa!ons Blue and Green which would you think would require the least effort on which to perform. maintenance tasks?

Blue

Green

Question 22

Give the best single reason why you made the decision you made in the previous ques!on. You may refer to other answers you have given, but you must be as brief as possible in your answer. Your answer will be assessed on the level of understanding shown of the course material and on its brevity. Answers longer than 100 words should not be needed.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Assignment 4 Assessing Maintainability Java
$25