COMP 2401BD Fall 2022 − "Introduction to Systems Programming"Final Project Specification | Due Dec 7th at 11:59PMCOMP 2401 B/DFinal ProjectThreads, and Putting it All TogetherGoals:This...

Complete this C project that is multi -threaded and its complex but you do need previous assignments to complete this


COMP 2401BD Fall 2022 − "Introduction to Systems Programming" Final Project Specification | Due Dec 7th at 11:59PM COMP 2401 B/D Final Project Threads, and Putting it All Together Goals: This project covers most of the major topics we’ve covered in the course, and largely leaves the design of the program up to you. You are allowed to reuse, and reference, old and similar code from previous assignments in the course. Many of the data structures and operations are repeated from what we’ve done in other assignments. This is a big project, and you are expected to reuse and improve upon functionality from previous assignments to help you get through sections quicker. The goal is that you can take time before programming to plan your code and identify suitable areas for code reuse. Some areas of the design are specified to test specific knowledge. Areas unspecified are up to you. Optional Pairs: For this final project, you are allowed to work in pairs - following some specific rules and allowances. ● Requirements and Restrictions: ○ If you wish to work as a pair, you must self-enroll in a group on Brightspace before November 23, 11:59PM ■ At the same time as your partner, go to Tools -> Groups and join the same group. ○ If you encounter difficulties with your partner, it is your responsibility to reach out to the instructor via email with your team mate, note the issue and note that you are no longer pairs, and leave the group on Brightspace. ■ Any work done by the group up until the point of separation may still be used by either partner. Collaboration beyond this point is considered misconduct. No other action will be taken beyond this. ○ You are restricted from using a “Divide and Conquer” technique. This is to say, you must collaborate on the program at the same time wherever possible, working together on each piece. You are responsible for understanding the full code, not just parts that you work on. ■ A short video on pair programming will be released to help facilitate this, but you can research the technique on your own ■ For remote collaboration, consider installing Visual Studio Code on the virtual machine and utilizing the “Live Share” plugin. Alternatively, you can screenshare via Discord. ● Allowances ○ As an established pair, registered on Brightspace, you are allowed to review and discuss the code of each other’s previous assignments at your own discretion to help you identify possible areas for code reuse. Please be aware that the project is fully capable of being completed individually. Pair options may increase speed, but it is primarily meant as a way to open communication about your approach with another student and contrast design ideas. Attempting to use a “divide and conquer” approach can lead to severe difficulties at the deadline with code not being put together correctly, and thus a pair-programming approach is required if you choose to work in pairs. If you would like to be placed in a random pairing, please let me know. Positions are not guaranteed. 1 COMP 2401BD Fall 2022 − "Introduction to Systems Programming" Final Project Specification | Due Dec 7th at 11:59PM Weekly Check-Ins This is a large and complex project, and you are expected to be working early and regularly on it. As part of this, you will be required to fill out a small weekly reflection each week to check-in on the state of your work. The reflections will be a few short answer questions in a Brightspace quiz, location under the Project submodule. ● The first reflection will run from Wednesday November 23rd, to Monday November 28th, at 11:59PM. ● The second reflection will run from Wednesday, November 30th, to Monday, December 5th, at 11:59PM. Each reflection is worth 5% of the final project grade, and will be evaluated SAT/UNSAT, if meaningful (even if brief) details are provided. You are required to make progress on the project before submitting each reflection. Reflections represent the state of the project up to the time you submit the reflection. If you are in a pair, there will be additional questions in the reflection for you to answer relating to your team mate. Assignment Context (Optional Read): It’s been a long time coming, but I think we’re ready to start using the communications network you have been building for some real ghost hunts! Of course, we don’t want anything to go wrong in the field, so we want you to create a simulator for us. Listen, we know you have programming chops at this point. We aren’t going to tell you how to work. I’m sure you can find some use from all of those old programs you’ve been writing; you have been writing them for reusability and readability, right? Well, either way, all that hard work should pay off and help move things forward here. What we need you to build is a full communication simulation. A map of connected rooms. Four hunters, each with a single device to take readings of evidence from a room. A ghost, wandering around and leaving evidence. When a hunter is in a room with a ghost, their fear level goes from 0 to 100, and when they reach 100, they’re out of there. See, every ghost leaves behind three kinds of evidence. We get readings in every room of course; there’s also sounds and temperatures to track, but a ghost leaves behind a special form of evidence. If we can find all three of those special kinds of evidence, we can identify the ghost and get rid of it! For this simulation, you’ll be generating data for evidence when we look for it. If there’s a ghost, make sure to use its ghostly data. Background Information: This is a summative project, meant to evaluate many aspects of your course knowledge. Primarily, this project looks at: ● User Input ● Dynamically and Statically allocated memory ● Linked Lists ● Static Arrays of Pointers ● Multi-threaded programming ● Makefiles Make sure to review these topics before beginning the project. 2 COMP 2401BD Fall 2022 − "Introduction to Systems Programming" Final Project Specification | Due Dec 7th at 11:59PM Data and and Behaviours: This section describes the overall definitions and control flow at a high level. More detailed instructions and requirements will be provided below. Be aware that your goal is to have a functioning, multi-threaded simulation, which follows the rules laid out here, and which executes without crashing, without valgrind warnings, and without memory leaks. While some implementation details are specified and must be adhered to, a large part of this assignment is using the tools from class to design your implementation. While you may create new collections and temporary structures, data (i.e. evidence, ghosts, rooms, and hunters) should only exist once in memory. Please be aware: Some of the data types will be used somewhat differently than we have used in class, and you are allowed to modify structures where requirements have not been specified. You are allowed to add additional data to these, as long as it follows good design principles. Data Definitions and Behaviours: 1. Room: A room represents a room in the building that the hunters are hunting in. A room has a name, a linked list of other rooms that it is connected to, a linked list of evidence that the ghost has left in the room, a collection of hunters currently in the room, and a pointer to the ghost. If the ghost is not in the room, the ghost pointer should be NULL. Note: You will be required to create a Linked List of RoomNodes, with RoomNodes containing Rooms. We must be able to append rooms to the end of the linked list, but we do not need to account for random insertion. You will likely want to write a separate, reusable function that takes in two Rooms and connects them together. 2. Building: A building is used to hold all of the information about the current hunt. It contains the ghost (either statically or dynamically allocated), a collection of all hunters, and a linked list of all rooms. The first room in every building is always the ghost hunter’s vehicle, the Van. The building that we will use is based on the “Willow Street House” from the video game Phasmaphobia. A map is available via the Steam Community and below [link]. Note: A sample populate function has been provided in the code building.c, moving from the van to the hallway. Your own design decisions may require modifying this code in order to work. It is provided for demonstration only. You may use your own building design, but it should have a similar complexity, i.e. at minimum 10 rooms, no single room is connected to all other rooms, and at least one room requires moving four times to reach. You must also include a visualization of the rooms, either as part of your program, as an easily understandable data file, or as a separate image included with the submission. 3 https://steamcommunity.com/sharedfiles/filedetails/?id=2251267947 COMP 2401BD Fall 2022 − "Introduction to Systems Programming" Final Project Specification | Due Dec 7th at 11:59PM 3. Ghost: A ghost is an entity that moves between rooms and leaves evidence behind. A ghost contains a GhostClass, which is an enumerated data type representing the type of ghost it is. It also contains a pointer to the room that it is in. It contains this pointer so that ghost related functions need only to know about the ghost to operate. It also contains a boredom timer - an integer initially set to BOREDOM_MAX. Each time the ghost is in a room with a hunter, it resets the counter to BOREDOM_MAX. Each time the ghost is in a room without a hunter, it decreases the timer variable by 1. If the boredom timer reaches <= 0,="" it="" is="" too="" bored,="" and="" ends="" its="" haunting.="" a="" ghost="" takes="" one="" of="" two="" actions:="" it="" has="" a="" random="" chance="" to="" generate="" evidence="" to="" add="" to="" the="" room,="" or="" it="" will="" move,="" or="" it="" will="" take="" no="" action.="" if="" a="" ghost="" is="" in="" a="" room="" with="" a="" hunter,="" it="" will="" not="" choose="" to="" move,="" but="" it="" may="" choose="" to="" take="" no="" action.="" these="" actions="" are="" selected="" at="" random.="" note:="" there="" is="" only="" ever="" one="" ghost="" in="" a="" building.="" each="" ghost="" leaves="" 3="" different="" types="" of="" evidence="" at="" random="" from="" a="" total="" of="" 4="" pieces="" of="" evidence,="" defined="" in="" the="" table="" below:="" table="" 1.="" a="" ghost="" can="" be="" a="" poltergeist,="" banshee,="" bullies,="" or="" phantom.="" 4.="" hunter:="" a="" hunter="" is="" an="" entity="" that="" moves="" between="" rooms,="" reads="" the="" room="" for="" evidence,="" and="" communicates="" evidence.="" they="" contain="" a="" pointer="" to="" the="" room="" they="" are="" currently="" in,="" an="" enumerated="" type="" representing="" the="" type="" of="" evidence="" their="" equipment="" can="" read="" (note:="" there="" is="" no="" equipment="" type,="" only="" the="" type="" of="" evidence="" they="" collect),="" a="" collection="" of="" evidence="" that="" they="" have="" personally="" collected,="" a="" name,="" and="" a="" fear="" integer="" which="" starts="" at="" 0.="" hunters="" choose="" their="" action="" at="" random.="" if="" a="" hunter="" is="" in="" a="" room="" with="" a="" ghost="" when="" they="" make="" their="" decision,="" they="" gain="" 1="" point="" of="" fear,="" specified="" by="" a="" definition="" in="" defs.h.="" if="" they="" reach="" 100="" fear,="" they="" are="" removed="" from="" the="" simulation="" by="" closing="" their="" thread.="" if="" you="" wish,="" you="" may="" add="" logic="" to="" the="" hunter’s="" actions="" beyond="" random="" selection.="" document="" these="" behaviours="" in="" your="" readme.="" if="" a="" hunter="" is="" in="" the="" same="" room="" as="" another="" hunter,="" they="" can="" choose="" to="" communicate.="" if="" they="" communicate,="" append="" ghostly="" evidence="" data="" to="" the="" other="" hunter’s="" evidence="" collection.="" ignore="" standard="" data.="" a="" hunter="" should="" also="" have="" a="" an="" integer="" timer="" variable.="" each="" time="" they="" detect="" ghostly="" evidence,="" reset="" the="" timer="" to="" boring_max.="" each="" time="" they="" take="" an="" action="" other="" than="" detecting="" ghostly="" evidence,="" decrease="" the="" timer="" by="" 1.="" if="" the="" timer="" is=""><= 0, they are bored, and will leave the building. 5. evidence: evidence is a simple data type containing the evidence class (or category) and a value for the data of that reading. evidence can be one of the following categories: emf, temperature, fingerprints, sound. the value for each piece of evidence is selected from the below table, table 1. a piece of evidence can have either a ghost reading or a standard reading; note, these readings are not reflected as fields. instead, when we create evidence, we generate the value for the evidence randomly following the table. note: if a ghost produces a value that is within the standard results, it can not be used as evidence for confirming that ghost type. it is a distraction. evidence is stored by each hunter, and in each room. multiple hunters may point to the same data, but once it is found, it is no longer in the room. evidence category standard results ghostly results emf 0.00 - 4.90 4.70 - 5.00 temperature 0.00 - 27.00 -10.00 - 1.00 fingerprints 0.00 1.00 sound 40.00 - 70.00 65.00 - 75.00 0,="" they="" are="" bored,="" and="" will="" leave="" the="" building.="" 5.="" evidence:="" evidence="" is="" a="" simple="" data="" type="" containing="" the="" evidence="" class="" (or="" category)="" and="" a="" value="" for="" the="" data="" of="" that="" reading.="" evidence="" can="" be="" one="" of="" the="" following="" categories:="" emf,="" temperature,="" fingerprints,="" sound.="" the="" value="" for="" each="" piece="" of="" evidence="" is="" selected="" from="" the="" below="" table,="" table="" 1.="" a="" piece="" of="" evidence="" can="" have="" either="" a="" ghost="" reading="" or="" a="" standard="" reading;="" note,="" these="" readings="" are="" not="" reflected="" as="" fields.="" instead,="" when="" we="" create="" evidence,="" we="" generate="" the="" value="" for="" the="" evidence="" randomly="" following="" the="" table.="" note:="" if="" a="" ghost="" produces="" a="" value="" that="" is="" within="" the="" standard="" results,="" it="" can="" not="" be="" used="" as="" evidence="" for="" confirming="" that="" ghost="" type.="" it="" is="" a="" distraction.="" evidence="" is="" stored="" by="" each="" hunter,="" and="" in="" each="" room.="" multiple="" hunters="" may="" point="" to="" the="" same="" data,="" but="" once="" it="" is="" found,="" it="" is="" no="" longer="" in="" the="" room.="" evidence="" category="" standard="" results="" ghostly="" results="" emf="" 0.00="" -="" 4.90="" 4.70="" -="" 5.00="" temperature="" 0.00="" -="" 27.00="" -10.00="" -="" 1.00="" fingerprints="" 0.00="" 1.00="" sound="" 40.00="" -="" 70.00="" 65.00="" -="">
Dec 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here