Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Assignment 1 -

This assignment has TWO (2) questions.

Objectives - The objective of this assessment is for you to demonstrate your understanding of issues related to the design and use of sequential and concurrent data structures and algorithms.

Question 1 - A group of chess players meet every week for chess games. They want to record who has won a game against whom.

The following games have been played:

Player 1 vs Player 2 - winner = Player 2

Player 2 vs Player 4 - winner = Player 4

Player 2 vs Player 6 - winner = Player 6

Player 3 vs Player 4 - winner = Player 3

Player 3 vs Player 5 - winner = Player 3

Player 5 vs Player 2 - winner = Player 2

Player 5 vs Player 6 - winner = Player 5

Player 6 vs Player 1 - winner = Player 1

Your task is to decide what data structure/s would be best to store this information. This can include any of the data structures studied in the module, e.g. graphs, hash maps, trees, linked lists. When selecting a data structure, think about what operations the chess players might want to perform with the data, and which structures would be more efficient for these operations.

(a) Explain which data structure/s you chose and how it would store the information. Be as specific as possible, e.g. if you chose to use a graph, state clearly whether the graph will be implemented as an adjacency matrix or adjacency lists, or if you used a hash map, state what type the keys and values are.

(b) Show, with the aid of diagrams or tables if appropriate, how the game information given above, i.e. Player 1 vs 2 with winner = 2 and so on, would be stored in your chosen structure.

(c) Give two examples of operations that can be performed using your data structure. Here are some suggestions:

  • Finding whether a given player has won against another given player.
  • Listing the players that a given player has beaten.
  • Listing the players that a given player has lost to.
  • Listing all the games that have been played, including who played whom and who won.
  • Listing the players that a given player has played against (won or lost).

For each of the example operations you choose, explain how it would work using the data structure/s you chose and what time complexity it would have.

Question 2 - There is a bridge over a deep cavern. A group of people want to cross, but the bridge is unstable and can only support at most two people at one time. The code for the Person class is given below, which represents a person crossing the bridge. It uses a shared semaphore bridge.

Person code:

wait(bridge);

cross();

signal(bridge);

(a) There are four people, A, B, C and D, who want to cross the bridge. Each person is an instance of the Person class. Demonstrate how the semaphore prevents more than two people being on the bridge at the same time by giving an example execution trace. Show the value of bridge after each wait or signal step. Ensure that you state the initial value of bridge.

If a wait operation executes, indicate whether the process succeeds or is placed in the queue. If a signal operation executes, indicate whether the value is changed or a sleeping process is woken up. (7 marks)

(b) The owner of the bridge wants to keep track of how many people cross it. A shared variable count is used for this. Each Person instance increments the count as they cross the bridge. The Person code is changed to the following:

Person code:

wait(bridge);

wait(mutex);

int c = count;

count = c + 1;

signal(mutex);

cross();

signal(bridge);

Give an example trace to show what would happen if there was no mutex semaphore but the count was still updated by each Person. Your trace should show how an incorrect value for count could be obtained.

Assignment 2: JavaFX Final Year Module Chooser GUI

You must develop the GUI using JavaFX (and not any other Java framework such as Swing or AWT). Furthermore, you cannot use a GUI builder of any kind. Failure to meet either of these two requirements will result in an automatic mark of zero for this assignment.

Objectives

The objective of this assessment is for you to demonstrate your ability to design and implement an OO system consisting of a set of Java classes, using advanced libraries within the Java SDK. In particular:

1. To study and correctly make use of a prebuilt student profile data model.

2. To build a suitable user interface using JavaFX 8 libraries.

3. To implement event handling procedures that provide a basis for an interactive and user-friendly system.

4. To adhere to standard principles of the Model-View-Controller (MVC) design pattern and appropriately decompose classes through abstraction and encapsulation.

JavaFX Module Chooser GUI specification

A student profile captures the details of an individual second year undergraduate computing student and allows them to select their final year module options. There are compulsory modules that must be selected (depending on the course of study), and others that are only associated with certain courses. Modules either run in term 1 or 2, or all year long.

Your task is to build an interactive graphical user interface (GUI) that dynamically allows modules to be selected based on the chosen course of study, and then stores this information. The application should be user-friendly and contain appropriate validation to ensure only a legitimate selection of modules is made.

For this prototype, you are only required to use the data of two courses, Computer Science and Software Engineering. However, the system should be designed such that it would be relatively simple to add further courses and modules in the future.

The table overleaf shows all of the available modules, their credit amount, and whether they are an option or compulsory for Computer Science and Software Engineering students.

Computer Science students have 45 compulsory credits, whereas Software Engineering students have 60 compulsory credits. Computer Science students can exclusively study IMAT3428.

In total 120 credits must be selected via any legitimate combination of modules, but crucially you may only select 60 credits per term. The yearlong module IMAT3451 contributes towards 15 credits in each term.

Attachment:- Assignment Files.rar

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92771262
  • Price:- $70

Guranteed 36 Hours Delivery, In Price:- $70

Have any Question?


Related Questions in Programming Language

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As