What should be modeled as threads

Assignment Help Data Structure & Algorithms
Reference no: EM13976720

Overview

In this project, you will require to develop a "back end" of a simple game simulation. No graphical output is required. All output should be stored in a (textual) log file.

In this game, we have: one dragline excavator, two trains, and one power plant. The dragline excavator consumes power cells and produces coal; power plant consumes coal and produces power cells; train consumes power cells and can transport both coal and power cells between excavator and power plant, respectively.

Specification

• Dragline Excavator (1x)

o Consumption: 2 power cells

o Production: 1 coal

o Storage for power cells:
- Max: 30 units
- Initial value: 10 units

o Storage for coal
- Max: 15 units
- Initial value: 5 units

• Power plant (1x)

o Consumption: 1 coal

o Production: 5 power cells

o Storage for power cells:
- Max:50 units
- Initial value: 10 units

o Storage for coal
- Max: 20 units
- Initial value: 10 units

• Train (2x)

o Consumption (from fuel cell tank): 1 fuel cell per one-way trip

o Capacity of fuel tank: 5 power cells

o Carrying capacity: 10 units of either coal or power cells (cannot be mixed!)

Part-1 (Individual Assignment)

Analyze proposed game and answer following questions:

• What should be modeled as threads?

• What should be modeled as variables? Which of them should be global (shared) and which can be local?

• What problems can occur in this game? (List all instances and be specific)

• What constructs can be used to prevent these problems?

Reference no: EM13976720

Questions Cloud

Explain how each process may harm living things : Many people confuse the large void in the ozone layer with global warming. Can you distinguish between the two phenomena? Discuss the causes of each. Explain how each process may harm living things. Response should be at least 200 words in length.
Issuance of the bonds at a premium : BONDS ISSUED AT A PREMIUM-Wang Corporation issued the following bonds ata premium:
Explain blackbody radiation using examples : Study Question Title: Blackbody Radiation, Explain blackbody radiation, using examples. Using the textbook and the internet, research blackbody radiation
Can ship make the roundtrip back to home in less time : If a ship enters each ergosphere and goes out into the next one, can it make the roundtrip back to home in less time than 2d/c (home local time)?
What should be modeled as threads : What should be modeled as variables? Which of them should be global (shared) and which can be local? What problems can occur in this game? (List all instances and be specific)
Perspective of negative and positive impact on society : Look at the findings - both from a perspective of negative and positive impact on society? Did the findings have a negative impact? How? Why? Or Why not
Explain the steps in creating a market research : List and explain the steps in creating a market research or feasibility study. Do not go into detail over forecasting, but give some explanation of how to progress through the steps
Explain the control procedures and security strategies : With specific reference to the company's accounting information system, critically evaluate the type and nature of both the risks and the security threats such a company faces in today's business environment and explain the control procedures and ..
Tax research memo identifying the relevant facts : Write a tax research memo identifying the Relevant Facts, Issues Identified, Conclusions, and Authorities and Reasoning for the tax problem listed below. Apply at least one relevant court case.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd