COP3502C Computer Science 1 Dr. Andrew Steinberg Spring 2022 Programming Assignment 5 The Unfair Game Max Points 100 Due: 4/22/2022 at 11:59pm Background Story of this Assignment You and 1999 friends...

1 answer below »
Must have a smiley face output when TESTING the program.


COP3502C Computer Science 1 Dr. Andrew Steinberg Spring 2022 Programming Assignment 5 The Unfair Game Max Points 100 Due: 4/22/2022 at 11:59pm Background Story of this Assignment You and 1999 friends are playing this new strategic battle game. The game requires two teams only. This means you and 999 people (1000 total) will be on one team together. In order to get the game started, teams need to be formed. The group votes you and Ron to be team captains. Ron is a brand new person who just moved into town and doesn’t know anyone or anything about them (including strengths and weaknesses). You however know everyone (including strengths and weaknesses)! You plan to use this to your advantage to pick the best players. Your objective is to pick the best players for the team so you can beat Ron. Have fun and start early (seriously start early)! Make sure to see the TAs and ULAs for help EARLY! DO NOT PROCASTINATE! Assignment Details In this assignment you are going to create the best team and make the game unfair. In order to find out if you made the game truly unfair, take the average ranking of both teams. The results should be completely different and not even close. Dr. Steinberg has provided a test script for a scenario to test out. Each player has a name (only first name) and an associated rank that determines their capabilities. The rank ranges from 1 to 5 (1 being the best and 5 being the worst). Each player can be represented as a typedef structure as follows. typedef struct{ char * name; //dynamic string int rank; }player_t; 1. The name component is a dynamic string that represents the first name of the player. 2. The rank component represents the rank (which can be 1, 2, 3, 4, or 5). The Provided Skeleton File For this assignment you were provided with a skeleton (program5_Skeleton.c) file that contains the following content. This section discusses the content of the provided skeleton file that you may not be familiar with. Line 5 defines the macro constant representing the number of players total. Line 13 shows a function prototype for an implemented function that reads player names from a text file and assigns them a rank. Lines 19-39 shows the main function. Inside the main function 3 dynamic arrays are created. One will contain the roster of ALL players and the other two are the teams. COP3502C Computer Science 1 Dr. Andrew Steinberg Spring 2022 Lines 44-62 shows the user defined function scanRoster that collects the name and assigns the ranking of the player randomly. Do not change this code! The Function Prototypes For this assignment, the function prototypes are not provided for you. At this point in the course you should have the necessary skills to apply function decomposition. Do not write your entire solution in the main function or one/two user defined function(s). Use good practice! Requirements Your program must follow these requirements. • The output must match exactly (this includes case sensitivity, white space, and even new lines). Any differences in the output will cause the grader script to say the output is not correct. Test with the script provided in order to receive potential full credit. Points will be deducted! • Do not remove ANY content of the skeleton that was provided for you. Your code will be tested through a script that relies on this main function. Any changes to this will result in your program not working fully which will lead to point deductions that will not be fixed! You will need to add to the skeleton file to get it to work. • Name your C file program5_lastname_firstname.c where lastname and firstname is your last and first name respectively. Please make sure it matches the spelling exactly how it is registered in Webcourses. Points will be deducted if the file is not named correctly. • You will need to make sure there are no memory leaks! • Do not change the typedef structure that was provided for you. • Your solution must run in ?(?????) time where n is the number of players. If the solution doesn’t satisfy this requirement, points will be deducted. • Use function decomposition! If you don’t use function decomposition, then points will be deducted. Tips in Being Successful Here are some tips and tricks that will help you with this assignment and make the experience enjoyable. • Do not try to write out all the code and build it at the end to find syntax errors. For each new line of code written (my rule of thumb is 2-3 lines), build it to see if it compiles successfully. It will go a long way! • After any successful build, run the code to see what happens and what current state you are at with the program writing so you know what to do next! If the program performs what you expected, you can then move onto the next step of the code writing. If you try to write everything at once and build it successfully to find out it doesn’t work properly, you will get frustrated trying find out the logical error in your code! Remember, logical errors are the hardest to fix and identify in a program! • Start the assignment early! Do not wait last minute (the day of) to begin the assignment. • Ask questions! It’s ok to ask questions. If there are any clarifications needed, please ask TAs/ULAs and the Instructor! We are here to help!!! You can also utilize the discussion board on COP3502C Computer Science 1 Dr. Andrew Steinberg Spring 2022 Webcourses to share a general question about the program as long as it doesn’t violate the academic dishonesty policy. Liam Noah Oliver Elijah William James Benjamin Lucas Henry Alexander Mason Michael Ethan Daniel Jacob Logan Jackson Levi Sebastian Mateo Jack Owen Theodore Aiden Samuel Joseph John David Wyatt Matthew Luke Asher Carter Julian Grayson Leo Jayden Gabriel Isaac Lincoln Anthony Hudson Dylan Ezra Thomas Charles Christopher Jaxon Maverick Josiah Isaiah Andrew Elias Joshua Nathan Caleb Ryan Adrian Miles Eli Nolan Christian Aaron Cameron Ezekiel Colton Luca Landon Hunter Jonathan Santiago Axel Easton Cooper Jeremiah Angel Roman Connor Jameson Robert Greyson Jordan Ian Carson Jaxson Leonardo Nicholas Dominic Austin Everett Brooks Xavier Kai Jose Parker Adam Jace Wesley Kayden Silas Bennett Declan Waylon Weston Evan Emmett Micah Ryder Beau Damian Brayden Gael Rowan Harrison Bryson Sawyer Amir Kingston Jason Giovanni Vincent Ayden Chase Myles Diego Nathaniel Legend Jonah River Tyler Cole Braxton George Milo Zachary Ashton Luis Jasper Kaiden Adriel Gavin Bentley Calvin Zion Juan Maxwell Max Ryker Carlos Emmanuel Jayce Lorenzo Ivan Jude August Kevin Malachi Elliott Rhett Archer Karter Arthur Luka Elliot Thiago Brandon Camden Justin Jesus Maddox King Theo Enzo Matteo Emiliano Dean Hayden Finn Brody Antonio Abel Alex Tristan Graham Zayden Judah Xander Miguel Atlas Messiah Barrett Tucker Timothy Alan Edward Leon Dawson Eric Ace Victor Abraham Nicolas Jesse Charlie Patrick Walker Joel Richard Beckett Blake Alejandro Avery Grant Peter Oscar Matias Amari Lukas Andres Arlo Colt Adonis Kyrie Steven Felix Preston Marcus Holden Emilio Remington Jeremy Kaleb Brantley Bryce Mark Knox Israel Phoenix Kobe Nash Griffin Caden Kenneth Kyler Hayes Jax Rafael Beckham Javier Maximus Simon Paul Omar Kaden Kash Lane Bryan Riley Zane Louis Aidan Paxton Maximiliano Karson Cash Cayden Emerson Tobias Ronan Brian Dallas Bradley Jorge Walter Josue Khalil Damien Jett Kairo Zander Andre Cohen Crew Hendrix Colin Chance Malakai Clayton Daxton Malcolm Lennox Martin Jaden Kayson Bodhi Francisco Cody Erick Kameron Atticus Dante Jensen Cruz Finley Brady Joaquin Anderson Gunner Muhammad Zayn Derek Raymond Kyle Angelo Reid Spencer Nico Jaylen Jake Prince Manuel Ali Gideon Stephen Ellis Orion Rylan Eduardo Mario Rory Cristian Odin Tanner Julius Callum Sean Kane Ricardo Travis Wade Warren Fernando Titus Leonel Edwin Cairo Corbin Dakota Ismael Colson Killian Major Tate Gianni Elian Remy Lawson Niko Nasir Kade Armani Ezequiel Marshall Hector Desmond Kason Garrett Jared Cyrus Russell Cesar Tyson Malik Donovan Jaxton Cade Romeo Nehemiah Sergio Iker Caiden Jay Pablo Devin Jeffrey Otto Kamari Ronin Johnny Clark Ari Marco Edgar Bowen Jaiden Grady Zayne Sullivan Jayceon Sterling Andy Conor Raiden Royal Royce Solomon Trevor Winston Emanuel Finnegan Pedro Luciano Harvey Franklin Noel Troy Princeton Johnathan Erik Fabian Oakley Rhys Porter Hugo Frank Damon Kendrick Mathias Milan Peyton Wilder Callan Gregory Seth Matthias Briggs Ibrahim Roberto Conner Quinn Kashton Sage Santino Kolton Alijah Dominick Zyaire Apollo Kylo Reed Philip Kian Shawn Kaison Leonidas Ayaan Lucca Memphis Ford Baylor Kyson Uriel Allen Collin Ruben Archie Dalton Esteban Adan Forrest Alonzo Isaias Leland Jase Dax Kasen Gage Kamden Marcos Jamison Francis Hank Alexis Tripp Frederick Jonas Stetson Cassius Izaiah Eden Maximilian Rocco Tatum Keegan Aziel Moses Bruce Lewis Braylen Omari Mack Augustus Enrique Armando Pierce Moises Asa Shane Emmitt Soren Dorian Keanu Zaiden Raphael Deacon Abdiel Kieran Phillip Ryland Zachariah Casey Zaire Albert Baker Corey Kylan Denver Gunnar Jayson Drew Callen Jasiah Drake Kannon Braylon Sonny Bo Moshe Huxley Quentin Rowen Santana Cannon Kenzo Wells Julio Nikolai Conrad Jalen Makai Benson Derrick Gerardo Davis Abram Mohamed Ronald Raul Arjun Dexter Kaysen Jaime Scott Lawrence Ariel Skyler Danny Roland Chandler Yusuf Samson Case Zain Roy Rodrigo Sutton Boone Saint Saul Jaziel Hezekiah Alec Arturo Jamari Jaxtyn Julien Koa Reece Landen Koda Darius Sylas Ares Kyree Boston Keith Taylor Johan Edison Sincere Watson Jerry Nikolas Quincy Shepherd Brycen Marvin Dariel Axton Donald Bodie Finnley Onyx Rayan Raylan Brixton Colby Shiloh Valentino Layton Trenton Landyn Alessandro Ahmad Gustavo Ledger Ridge Ander Ahmed Kingsley Issac Mauricio Tony Leonard Mohammed Uriah Duke Kareem Lucian Marcelo Aarav Leandro Reign Clay Kohen Dennis Samir Ermias Otis Emir Nixon Ty Sam Fletcher Wilson Dustin Hamza Bryant Flynn Lionel Mohammad Cason Jamir Aden Dakari Justice Dillon Layne Zaid Alden Nelson Devon Titan Chris Khari Zeke Noe Alberto Roger Brock Rex Quinton Alvin Cullen Azariah Harlan Kellan Lennon Marcel Keaton Morgan Ricky Trey Karsyn Langston Miller Chaim Salvador Amias Tadeo Curtis Lachlan Amos Anakin Krew Tomas Jefferson Yosef Bruno Korbin Augustine Cayson Mathew Vihaan Jamie Clyde Brendan Jagger Carmelo Harry Nathanael Mitchell Darren Ray Jedidiah Jimmy Lochlan Bellamy Eddie Rayden Reese Stanley Joe Houston Douglas Vincenzo Casen Emery Joziah Leighton Marcellus Atreus Aron Hugh Musa Tommy Alfredo Junior Neil Westley Banks Eliel Melvin Maximo Briar Colten Lance Nova Trace Axl Ramon Vicente Brennan Caspian Remi Deandre Legacy Lee Valentin Ben Louie Westin Wayne Benicio Grey Zayd Gatlin Mekhi Orlando Bjorn Harley Alonso Rio Aldo Byron Eliseo Ernesto Talon Thaddeus Brecken Kace Kellen Enoch Kiaan Lian Creed Rohan Callahan Jaxxon Ocean Crosby Dash Gary Mylo Ira Magnus Salem Abdullah Kye Tru Forest Jon Misael Madden Braden Carl Hassan Emory Kristian Alaric Ambrose Dario Allan Bode Boden Juelz Kristopher Genesis Idris Ameer Anders Darian Kase Aryan Dane Guillermo Elisha Jakobe Thatcher Eugene Ishaan Larry Wesson Yehuda Alvaro Bobby Bronson Dilan Kole Kyro Tristen Blaze Brayan Jadiel Kamryn Demetrius Maurice Arian Kabir Rocky Rudy Randy Rodney Yousef Felipe Robin Aydin Dior Kaiser Van Brodie London
Answered 5 days AfterApr 08, 2022

Answer To: COP3502C Computer Science 1 Dr. Andrew Steinberg Spring 2022 Programming Assignment 5 The Unfair...

Vaibhav answered on Apr 14 2022
102 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here