Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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?

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91671492

Have any Question?


Related Questions in Computer Engineering

Suppose that we have a binary counter with k bits where

Suppose that we have a binary counter with k bits, where each bit is stored in a array A[0..k - 1]. The operation Increment(A) increments the counter by adding 1 to the content of the counter modulo 2k . The cost of this ...

Start up your web browser and clear the browsers cache

Start up your web browser and clear the browser's cache memory (Use the following website if you don't know how to do this), but do not access any site after clearing the cache. ? Open Wireshark and start capturing. Now, ...

Question topic business informationsearching relevant

Question: Topic: Business Information Searching relevant scholarly journal articles, research and discuss the following prompts. Include a minimum of two (2) scholarly journal articles relevant to each prompt for a total ...

In reconnaissance provide three different methods or means

In Reconnaissance Provide three different methods or means to locate information about your target. What sorts of information would you expect to obtain using each source? What might you use the information obtained from ...

If no payments are made a loan of amount 44000 would

If no payments are made, a loan of amount $44000 would increase to $49103.89 after 2 years of monthly compounding interest. If instead, payments of $718.87 are made at the end of each month, how many years would it be un ...

Question find an article on the www that discusses a recent

Question: Find an article on the WWW that discusses a recent (within the last 2 years) security breach or Cyberattack. Provide a link to the article and suggest 2 Best practices for a user Domain Policy that would mitiga ...

Recommend a mechanism that will record event data on the

Recommend a mechanism that will record event data on the folders for each department. What events should be logged and how often do these logs need to be reviewed? Recommend an implementation for antivirus software. Sugg ...

Question suppose that the equallists function page 49 of

Question : Suppose that the equal_lists function (page 49 of Sebesta's Book Concepts of Programming Languages edition 11) is called with the lists ((A (B)) (C)) and ((A (B)) (C)) as the arguments. How many calls of equal ...

Question overview of information security and risk

Question: Overview of Information Security and Risk Management (Due Oct 24) Does your company (or school) have a current disaster recovery plan? What are some of the activities involved in it? Do you feel confident that ...

Question describe specifically how the organization will

Question: Describe specifically how the organization will formulate a business performance plan, as follows: • Conduct a current situation analysis. • Determine the planning horizon. • Conduct an environmental scan. • Id ...

  • 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