C++ Need help in 12 hours - Computer Science
verview In this assignment, you will convert some of your existing types to classes.  Players will also have to pay for the tiles they want to place, and there will be a list of tiles available to buy. The purpose of this assignment is to give you practice working with classes.  For Part A, you will convert the tile module to an encapsulated class.  For Part B, you will convert the board module to another encapsulated class.  For Part C, you will add a third class to store the available tiles.  For Part D, you will change your main function so that the players buy tiles from a list of available tiles. Requirements Start by creating a new project (or new folder, etc.) for Assignment 3.  Do not just modify Assignment 2.  If you are using Visual Studio, create a new project and copy in the code files (.h and .cpp) from Assignment 2.  Do not ever copy a Visual Studio project.  If you do, it will get all mixed up between the two of them and Bad Things will happen. Part A: Convert the Tile Module to a Class [35\% = 24\% test program + 11\% code] In Part A, you will convert the Tile type to an encapsulated class.  You will also add a class invariant that requires the tile genus to be strictly less than GENUS_COUNT. By the end of Part A, your Tile class will have the following public member functions: ·              Tile (); ·              Tile (unsigned int genus1,            unsigned int species1); ·              bool isOwner () const; ·              unsigned int getAffectedPlayer (                             unsigned int whose_turn) const; ·              unsigned int getGenus () const; ·              unsigned int getSpecies () const; ·              void setOwner (unsigned int owner1); ·              void activate (unsigned int whose_turn) const; ·              void print () const; You will also have the following private member functions: ·              void printOwnerChar () const; ·              void printGenusChar () const; ·              void printSpeciesChar () const; ·              bool isInvariantTrue () const; Perform the following steps: Convert the Tile record to a class.  The fields should become private member variables. Convert the Tile-associated functions to member functions in the interface (i.e., .h) and implementation (i.e., .cpp)  files.  The tilePrint*Char functions should be private and the others should be pubic.  The tileCreate function should become the non-default constructor.  Remove the word tile from the function names and change the new first letter to lowercase.  In the implementation file, add Tile:: before every function name. Reminder: A * in a name means anything.  So tilePrint*Char refers to three functions. Reminder: If a member function calls another member function, you will have to update the name in the call as well. Remove the Tile parameter from all the functions.  Inside the functions, update the member variables to not use dot notation.  For example, tile.genus should become plain genus. Add a default constructor that sets the owner to NO_OWNER, the genus to GENUS_MONEY, and the species to 1.  Remember to add the function prototype. Note: If we dont declare a default constructor, the compiler will not allow us to declare an array of Tiles.  (Because it has to call the default constructor for each element when an array is created.)  So we need the default constructor or the board wont work. Add a precondition to the non-default constructor that requires the genus1 parameter to be strictly less than GENUS_COUNT.  Use an assert to enforce the precondition. Reminder: Every constructor must initialize every member variable.  In this case, your constructor must initialize the genus, the species, and the owner. Add a private const member function named isInvariantTrue to check the class invariant.  It should return true if the tile genus is strictly less than GENUS_COUNT and false if it is the same or greater. Check the class invariant at the end of every non-const public member function.  For the Tile class, this is both constructors and setOwner.  At the end of each of these functions, use an assert to make sure that isInvariantTrue returns true:      assert(isInvariantTrue()); The purpose of this is to ensure that these functions do not leave the Tile in an invalid state.  The const functions cannot change the tile state, so we dont need to check the invariant there. Note: Dont check the invariant in private functions.  It will be checked in the functions that call them. Check the class invariant at the start of every public member function except the constructors.  Use an assert to make sure that isInvariantTrue returns true.  The purpose of this is to ensure that the Tile in a valid state when the function is called. Reminder: Dont check the invariant in private functions. Test your Tile module using the TestTile3.cpp program provided.  As always, you will need TestHelper.h and TestHelper.cpp. Part B: The Board Class [25\% = 15\% test program + 10\% documentation] In Part B, you will convert your board module to an encapsulated class.  The Board class will not have a class invariant. By the end of Part B, your Board class will have the following public member functions: ·              Board (); ·              void print () const; ·              const Tile& getAt (const CellId& cell_id) const; ·              void setAt (const CellId& cell_id,                  const Tile& value,                  unsigned int owner); You will also have the following private member functions: ·              void printColumnNameRow () const; ·              void printBorderRow () const; ·              void printEmptyRow () const; ·              void printDataRow (int row) const; Perform the following steps: Declare a Board class.  It should have a 2D array of Tiles as a private member variable.  Remove the Board typedef. Convert the existing function prototypes to member functions or copy in the ones shown above.  Update the implementation file to match. Convert the boardInit function into a default constructor.  When assigning values to the board array, use the non-default Tile constructor.  The syntax is: array_name[i][j] = Tile(put parameters here); Change the getAt and setAt functions to take a const reference to a CellId as a parameter instead of a row and a column. Add a precondition to the getAt and setAt functions, enforced by an assert.  It should require that the cell is on the board. Hint:  You have a function to check that a cell is on the board. Add a parameter to the setAt function for the new tiles owner.  The function should set the new tile on the board to have that owner.  And a precondition that the tile parameter does not already have an owner. Hint:  Use a function from the Tile class to change the owner. Test your Board class using the TestBoard3.cpp program provided. Update your main function to use the new Tile and Board classes.  It should run as before. Write interface specifications for the four public functions in the Board class.  Use the format described in class and in Section 4a of the online notes.  You do not have to write interface specifications for the private functions. Reminder:  Interface specifications are written for other programmers who want to use your module. Part C: The AvailableTiles Class [40\% = 26\% test program + 4\% code] In Part C, you will create and document a class named AvailableTiles.  The class will keep track of the five tiles that are available for the players to buy and the cost for each.  At the start, five tiles will be chosen randomly.  Whenever a tile is removed, the higher-numbered tiles will be moved down and a random new tile will be added at the end.  For example, suppose we refer to the available tiles as I, J, K, L, M. Also suppose that tile K was removed and a new tile (referred to as N) was picked randomly to be added. Then the revised list of available tiles would be I, J, L, M, N.  When the tiles are moved, their costs move with them. ·         Note: A tile is actually a three-part object with owner, genus, and species member variables—we are referring to them by single letters for convenience here. ·         Note: When you remove the tile from the available tiles list, a new tile will be placed in the last position of the list. By the end of Part C, your AvailableTiles class will have the following public member functions: ·              AvailableTiles (); ·              void print () const; ·              int getCost (unsigned int index) const; ·              const Tile& getTile (unsigned int index) const; ·              void replaceAt (unsigned int index); You will also have the following private member function: ·              void setRandomTile (unsigned int index); Perform the following steps: Declare an unsigned integer constant named AVAILABLE_TILE_COUNT for the number of available tiles. It should have value 5. Since it is constant, the number of available tiles never changes. Create the AvailableTiles class.  It should have member variables that store the available tiles and tile costs.  One way to do this is to have two arrays of the same length. Copy in the function prototypes. Write the implementation for the setRandomTile function.  You should construct a tile and copy it (with an assignment operator into the specified position in the available tiles list. You should also set the corresponding cost. The owner member variable of the tile will be set to NO_OWNER by the tile constructor.  In this assignment, all the available tiles will be points tiles.  Choose a random value from 1, 2, or 3, with an equal chance of each, and name it P for points. The tile species should be P and the tile cost should be P * P.  Give the function a precondition that requires the index parameter to be strictly less than the number of available tiles.  Enforce the precondition with an assert. Write the implementation for the default constructor.  It should call sendRandomTile for each tile. Write the implementation for the print function.  It should print one line for each tile, showing the tile index, the tile itself, and the tile cost with a dollar sign ($).  One acceptable format is  N: TTT   $C, where N is the index, TTT is the tile, and C is the cost. Reminder: A function for printing a tile in a three-character format, here shown as TTT, was developed in Assignment 2 and converted to a member function in Part A above. Write the implementations for the getCost and getTile functions.  Both functions should have a precondition that requires the index parameter to be strictly less than the number of tiles.  Enforce the preconditions with asserts. Write the implementation for the replaceAt function.  It should move the tiles that have higher indexes one spot down the array and call a function to set the last tile.  Add an assert-enforced precondition that requires the index parameter to be strictly less than the number of tiles. Hint: You can assign objects with the assignment statement, just like any other variable.  For example: MyClass c1; MyClass c2; c1 = c2;  // this is legal Reminder: Also move the costs when you move the tiles. Test your AvailableTiles module using the TestAvailableTiles3.cpp program provided. Part D: Improve the main Function [10\% output] In Part D, you will use your AvailableTiles class in the main function.  Instead of simply placing tiles, players will buy them from a list of available tiles.  If the player doesnt have enough money, he/she will not be able to buy the tile. 1.       Add an AvailableTiles variable to your main function.  Print it out after printing the board but before printing whose turn it is. 2.       After the player chooses a valid cell to place a tile in, the player should choose a tile to place there.  The program should first ask which tile (by index) the player wants to put there and read in the players answer.  If the index is invalid, print a failure message.  Otherwise, if the player does not have enough money to pay the cost for that tile, print a failure message.  Otherwise, add the tile to the game board, reduce the players money, remove the tile from the available tiles list, and print a success message. ·         Note: When you remove the tile from the available tiles list, a new tile will be placed in the last position of the list. 3.       If the player does not succeed in placing a tile, remove the first tile (the one in position 0) from the available tiles list. ·         Hint: Create a bool variable and set it before asking the player for a cell.  Then change the value if the player successfully adds a tile.  If the variable still has its original value after all the checks, then the player failed to place a tile. Formatting [ −10\%] Neatly indent your program using a consistent indentation scheme. Put spaces around your arithmetic operators: x = x + 3; Use symbolic constants, such as BOARD_SIZE, when appropriate. Include a comment at the top of Main.cpp that states your name and student number. Format your program so that it is easily readable.  Things that make a program hard to read include: ·         Very many blank lines.  If more than half your lines are blank, you probably have too many.  The correct use of blank lies is to separate logically distinct sections of your program. ·         Multiple commands on the same line.  In general, dont do this.  You can if it makes the program clearer than if the same commands were on separate lines. ·         Uninformative variable names.  For a local variable that is only used for a few lines, it doesnt really matter.  But a variable that is used over a larger area (including all global variables and field names) should have a name that documents its purpose.  Similarly, parameters should have self-documenting names because the function will be called elsewhere in the program. Submission ·         Submit a complete copy of your source code.  You should have the following files with exactly these names: 1.   AvailableTiles.h 2.   AvailableTiles.cpp 3.   BoardSize.h 4.   BoardSize.cpp 5.   Board.h 6.   Board.cpp 7.   CellId.h 8.   CellId.cpp 9.   Dice.h 10. Dice.cpp 11. Main.cpp 12. Tile.h 13. Tile.cpp o   Note: A Visual Studio .sln file does NOT contain the source code; it is just a text file.  You do not need to submit it.  Make sure you submit the .cpp files and .h files. o   Note: You do not need to submit the test programs or the Player.h and Player.cpp files.  The marker has those already. ·         If possible, convert all your files to a single archive (.zip file) before handing them in ·         Do NOT submit a compiled version ·         Do NOT submit intermediate files, such as: o   Debug folder o   Release folder o   ipch folder o   *.o files o   *.ncb, *.sdf, or *.db files ·         Do NOT submit a screenshot Important Notes  1) Solution 2 will help u 2) Internet se copy paste nahi karna hai , Original work chaiye  PFA
CATEGORIES
Economics Nursing Applied Sciences Psychology Science Management Computer Science Human Resource Management Accounting Information Systems English Anatomy Operations Management Sociology Literature Education Business & Finance Marketing Engineering Statistics Biology Political Science Reading History Financial markets Philosophy Mathematics Law Criminal Architecture and Design Government Social Science World history Chemistry Humanities Business Finance Writing Programming Telecommunications Engineering Geography Physics Spanish ach e. Embedded Entrepreneurship f. Three Social Entrepreneurship Models g. Social-Founder Identity h. Micros-enterprise Development Outcomes Subset 2. Indigenous Entrepreneurship Approaches (Outside of Canada) a. Indigenous Australian Entrepreneurs Exami Calculus (people influence of  others) processes that you perceived occurs in this specific Institution Select one of the forms of stratification highlighted (focus on inter the intersectionalities  of these three) to reflect and analyze the potential ways these ( American history Pharmacology Ancient history . Also Numerical analysis Environmental science Electrical Engineering Precalculus Physiology Civil Engineering Electronic Engineering ness Horizons Algebra Geology Physical chemistry nt When considering both O lassrooms Civil Probability ions Identify a specific consumer product that you or your family have used for quite some time. This might be a branded smartphone (if you have used several versions over the years) or the court to consider in its deliberations. Locard’s exchange principle argues that during the commission of a crime Chemical Engineering Ecology aragraphs (meaning 25 sentences or more). Your assignment may be more than 5 paragraphs but not less. INSTRUCTIONS:  To access the FNU Online Library for journals and articles you can go the FNU library link here:  https://www.fnu.edu/library/ In order to n that draws upon the theoretical reading to explain and contextualize the design choices. Be sure to directly quote or paraphrase the reading ce to the vaccine. Your campaign must educate and inform the audience on the benefits but also create for safe and open dialogue. A key metric of your campaign will be the direct increase in numbers.  Key outcomes: The approach that you take must be clear Mechanical Engineering Organic chemistry Geometry nment Topic You will need to pick one topic for your project (5 pts) Literature search You will need to perform a literature search for your topic Geophysics you been involved with a company doing a redesign of business processes Communication on Customer Relations. Discuss how two-way communication on social media channels impacts businesses both positively and negatively. Provide any personal examples from your experience od pressure and hypertension via a community-wide intervention that targets the problem across the lifespan (i.e. includes all ages). Develop a community-wide intervention to reduce elevated blood pressure and hypertension in the State of Alabama that in in body of the report Conclusions References (8 References Minimum) *** Words count = 2000 words. *** In-Text Citations and References using Harvard style. *** In Task section I’ve chose (Economic issues in overseas contracting)" Electromagnetism w or quality improvement; it was just all part of good nursing care.  The goal for quality improvement is to monitor patient outcomes using statistics for comparison to standards of care for different diseases e a 1 to 2 slide Microsoft PowerPoint presentation on the different models of case management.  Include speaker notes... .....Describe three different models of case management. visual representations of information. They can include numbers SSAY ame workbook for all 3 milestones. You do not need to download a new copy for Milestones 2 or 3. When you submit Milestone 3 pages): Provide a description of an existing intervention in Canada making the appropriate buying decisions in an ethical and professional manner. Topic: Purchasing and Technology You read about blockchain ledger technology. Now do some additional research out on the Internet and share your URL with the rest of the class be aware of which features their competitors are opting to include so the product development teams can design similar or enhanced features to attract more of the market. The more unique low (The Top Health Industry Trends to Watch in 2015) to assist you with this discussion.         https://youtu.be/fRym_jyuBc0 Next year the $2.8 trillion U.S. healthcare industry will   finally begin to look and feel more like the rest of the business wo evidence-based primary care curriculum. Throughout your nurse practitioner program Vignette Understanding Gender Fluidity Providing Inclusive Quality Care Affirming Clinical Encounters Conclusion References Nurse Practitioner Knowledge Mechanics and word limit is unit as a guide only. The assessment may be re-attempted on two further occasions (maximum three attempts in total). All assessments must be resubmitted 3 days within receiving your unsatisfactory grade. You must clearly indicate “Re-su Trigonometry Article writing Other 5. June 29 After the components sending to the manufacturing house 1. In 1972 the Furman v. Georgia case resulted in a decision that would put action into motion. Furman was originally sentenced to death because of a murder he committed in Georgia but the court debated whether or not this was a violation of his 8th amend One of the first conflicts that would need to be investigated would be whether the human service professional followed the responsibility to client ethical standard.  While developing a relationship with client it is important to clarify that if danger or Ethical behavior is a critical topic in the workplace because the impact of it can make or break a business No matter which type of health care organization With a direct sale During the pandemic Computers are being used to monitor the spread of outbreaks in different areas of the world and with this record 3. Furman v. Georgia is a U.S Supreme Court case that resolves around the Eighth Amendments ban on cruel and unsual punishment in death penalty cases. The Furman v. Georgia case was based on Furman being convicted of murder in Georgia. Furman was caught i One major ethical conflict that may arise in my investigation is the Responsibility to Client in both Standard 3 and Standard 4 of the Ethical Standards for Human Service Professionals (2015).  Making sure we do not disclose information without consent ev 4. Identify two examples of real world problems that you have observed in your personal Summary & Evaluation: Reference & 188. Academic Search Ultimate Ethics We can mention at least one example of how the violation of ethical standards can be prevented. Many organizations promote ethical self-regulation by creating moral codes to help direct their business activities *DDB is used for the first three years For example The inbound logistics for William Instrument refer to purchase components from various electronic firms. During the purchase process William need to consider the quality and price of the components. In this case 4. A U.S. Supreme Court case known as Furman v. Georgia (1972) is a landmark case that involved Eighth Amendment’s ban of unusual and cruel punishment in death penalty cases (Furman v. Georgia (1972) With covid coming into place In my opinion with Not necessarily all home buyers are the same! When you choose to work with we buy ugly houses Baltimore & nationwide USA The ability to view ourselves from an unbiased perspective allows us to critically assess our personal strengths and weaknesses. This is an important step in the process of finding the right resources for our personal learning style. Ego and pride can be · By Day 1 of this week While you must form your answers to the questions below from our assigned reading material CliftonLarsonAllen LLP (2013) 5 The family dynamic is awkward at first since the most outgoing and straight forward person in the family in Linda Urien The most important benefit of my statistical analysis would be the accuracy with which I interpret the data. The greatest obstacle From a similar but larger point of view 4 In order to get the entire family to come back for another session I would suggest coming in on a day the restaurant is not open When seeking to identify a patient’s health condition After viewing the you tube videos on prayer Your paper must be at least two pages in length (not counting the title and reference pages) The word assimilate is negative to me. I believe everyone should learn about a country that they are going to live in. It doesnt mean that they have to believe that everything in America is better than where they came from. It means that they care enough Data collection Single Subject Chris is a social worker in a geriatric case management program located in a midsize Northeastern town. She has an MSW and is part of a team of case managers that likes to continuously improve on its practice. The team is currently using an I would start off with Linda on repeating her options for the child and going over what she is feeling with each option.  I would want to find out what she is afraid of.  I would avoid asking her any “why” questions because I want her to be in the here an Summarize the advantages and disadvantages of using an Internet site as means of collecting data for psychological research (Comp 2.1) 25.0\% Summarization of the advantages and disadvantages of using an Internet site as means of collecting data for psych Identify the type of research used in a chosen study Compose a 1 Optics effect relationship becomes more difficult—as the researcher cannot enact total control of another person even in an experimental environment. Social workers serve clients in highly complex real-world environments. Clients often implement recommended inte I think knowing more about you will allow you to be able to choose the right resources Be 4 pages in length soft MB-920 dumps review and documentation and high-quality listing pdf MB-920 braindumps also recommended and approved by Microsoft experts. The practical test g One thing you will need to do in college is learn how to find and use references. References support your ideas. College-level work must be supported by research. You are expected to do that for this paper. You will research Elaborate on any potential confounds or ethical concerns while participating in the psychological study 20.0\% Elaboration on any potential confounds or ethical concerns while participating in the psychological study is missing. Elaboration on any potenti 3 The first thing I would do in the family’s first session is develop a genogram of the family to get an idea of all the individuals who play a major role in Linda’s life. After establishing where each member is in relation to the family A Health in All Policies approach Note: The requirements outlined below correspond to the grading criteria in the scoring guide. At a minimum Chen Read Connecting Communities and Complexity: A Case Study in Creating the Conditions for Transformational Change Read Reflections on Cultural Humility Read A Basic Guide to ABCD Community Organizing Use the bolded black section and sub-section titles below to organize your paper. For each section Losinski forwarded the article on a priority basis to Mary Scott Losinksi wanted details on use of the ED at CGH. He asked the administrative resident