1CSP2151: Workshop 3—————————————————————————————————————Non-assessable tasks:Lab practice: Design and/or implement1) Write a function is_sorted(int A[], int n) that returns “true” if the array A[0…n-1]is in sorted order.2) Write a function sqmatrix_mult(sqmatrix A, sqmatrix B, sqmatrix C, int n) thatcalculates the matrix product C = A × B, assuming that each matrix is n by n.3) Write the function strlen(char *s) that returns the length (in characters) of thestring indicated by s. If you find it easier to think in terms of arrays, regard theargument as being of type char s[].4) Define a structure to account for this situation:Cars have six-character registration numbers, and two dates associated withthem – the date the car was first registered, and the date that the currentregistration expires. Each car also has fields (40-byte strings) formanufacturer, make, body type, and colour; and a field to record the numberof owners it has had.Practice tasks (optional):Design and implement a program that reads text from the standard input, and writes alist of the distinct words that appear. Words may be limited to a maximum of 10alphabetic characters. Assume that as many as 1,000 distinct words might appear.—————————————————————————————————————-2Assessable tasks:Your next assessable task is to continue creation of the simulation of a robotics competition.Design and implement (in C) the following:(1) Create a Robot structure with the following fields:• Robot_Number //of int type• Robot_Name //string, up to 20 chars• Year_Manufacturer //of int type, >=1990• Top_Speed //of float type, >=0.0• Mass //of float type, >0.0Consider the following list of robots that could possibly be used in simulation of a roboticscompetition.Table 1: List of robot information RobotNumberRobot NameYearManufacturedTop Speed(m/s)Mass(kg)1BeautyLink19991701102BigBrain201092.5183LucyJar201329.517.54MiMi201820.010.8…… (1) Extend your previous program to simulate the robotics competition using the robotinformation stored in the Robot_info array.Your program should first create an array of structs, Robot_info [ ], that stores robotinformation (using above defined struct, Robot). Your array should be able to storeinformation for up to 100 robots. Initialize the Robot_info array with appropriate robotinformation for at least 5 robots. The program then displays all available robot information(with a properly designed format) on the screen.The program then selects a list of robots for a scenario of robotics competition: (i)Prompt the user to enter 2 variables: finish_line_distance (in m) and finish_time (insec.). The program then calculates a Trial_speed, using the variable values entered(and formula from previous workshops).The program searches robot information from the Robot_info array to decide which(ii) robots are capable of being used for the scenario of robotics competition. That is,for every robots in the array, if its Top_Speed is greater than or equal to theTrial_speed, the corresponding robot is considered as being capable of being usedfor the robotics competition, and its information are displayed on screen.It is up to you to decide the format to display your search result. For example, youmay display a table some the search result/information, like3where is the Trial_speed calculated above, and is the totalnumber of robots stored in the Robot_info[ ] that could be used for thecompetition.(iii) At this point the user should be asked if he/she would like to repeat the simulationagain (Yes/No?). The user chooses “Yes”, the program should continue the abovesteps (i) and (ii), …, and Exit otherwise.Note: You should consider some exceptional cases if something goes wrong, for example, todeal with the following cases:• Error handling: In step (i) if the variable value of finish_line_distance or finish_timeis entered 0 or less, an error message should be displayed and variable value/sshould be re-entered;• Exception handling: In step (ii) if the total number of robots that are capable ofbeing used for simulation is 0, the table of searching result (see above) should notbe displayed, but instead a message (or similar) should be displayed, e.g.,“No robots is capable of being used for the robotics competition scenario!”(2) Bonus Marks:You are encouraged to further extend your program (to a new version of code):• Add a menu that not only do the above task but also extra functions, such as(i) allowing users create (or enter information for) more robots . Use aninteger to keep track of number of robots that have been created so far.Be careful – Don’t allow the user to create more than 100;(ii) displaying robot information for all available robots including thosenewly entered/updated;(iii) searching robot information by robot name;(iv) searching robot information by robot number, etc.Again, additional work and effort to improve the program and make it more useful can beworth bonus marks. Up to 2 marks can be added for the above improvement. Again, Bonusmarks are not required and will not improve your grade above 100%.(Note: To obtain the Bonus mark, a new version of codes should be submitted. That is: you need tosubmit two versions of codes: one version only completed the required Assessable tasks (without anywork for Bonus mark), and the other version serves as an advanced version containing the work for therequired Assessable tasks, together with the work for the bonus mark. For example, you may nameyour codes “workshop3.c” and “workshop3_bonus.c”, respectively)————————- The end of the Workshop description —————————–Robots capable of being used for a robotics competition with Trial_speed of (m/s):———————————————————————————————————————————… …———————————————————————————————————————————-A total of robots are capable of being used for the robotics competition scenario4 Design and coding requirements:• The Design: For this workshop, you can use either pseudocode or flowchart (but notboth) to complete the design. Your design document should contain separate designsfor each of functions, if you have any function/s. Again, please adhere to the notationused in the unit materials wherever possible. If you can’t do this for some reason,make sure that whatever notation you use is consistently applied and clearlyrepresents the meaning of what you are depicting, and add keys or legends ifnecessary.• The C code: Your C code must be consistent with your design.This workshop is to test your understanding of basic programming concepts relatedto functions, pointers, arrays, strings and structs etc. to assess your ability in usingvarious data structures and control structures to implement small- and/or middlesized programs. Therefore, please try to use these data structures as much aspossible and use different types of control structure (such as loops) in your C code.No global variables should be used in this workshop. The only Libraries to be used inthis workshop are , , , and . Workshop Submission Requirements:• You are required to submit, through Blackboard (BB), a zip file containing at least three files:the design document, the C source code for Assessable tasks (e.g., workshop3.c) and anexecutable code (i.e., *.exe). An additional C code (e.g., Workshop3_bunos.c) should also beincluded in the zip file if you have completed the work for bonus marks. Email or papersubmission is not allowed.• The Design document must be in Word or PDF format. The assignment cover sheet is notrequired but please make sure you include the information such as unit code, Workshopnumber, year and semester, and your name and student number, etc. in header/footer area(or somewhere else in the first page) of the file.• Please rename your zip file asCSP2151_Workshop3__.zip.and only submit the single .zip file only.Note:• Only submit your solution to the Assessable part, and possibly to bonus marks part if you attempted(but not for non-assessable part).• If you don’t know how to prepare and submit a zip file, watch the related video in Assignment section.• Double check all documents/codes constianed in your submission/zip file and make sure they are thecorrect version/s before submitting – You should run the code/d again before submitting, to avoidsubmitting incorrect file versions for marking.• If you encounter any difficulties when submitting workshop solution through Blackboard, pleasecontact your tutor (Kan, via k.yu@ecu.edu.au), or Jitian, via j.xiao@ecu.edu.au) and briefly explain thedifficulties you experienced (e.g., BB was down, BB doesn’t accept specific type of files, etc.).• Please keep the copy you submitted (in case your submission to BB was corrupted and you arerequested to provide the same copy again). 5 Academic Integrity and Misconduct• This workshop is an individual work (not a teamwork). Your entire assignment must be yourown work (unless quoted otherwise) and produced for the current instance of the unit. Anyuse of uncited content that was not created by you yourself constitutes plagiarism and isregarded as Academic Misconduct. All assignments will be submitted to plagiarism checkingsoftware, which compares your submission version with previous copies of the assignment,and the work submitted by all other students in the unit (in the current semester or previousyears/semesters).• Never give any part of your assignment to someone else, even after the due date or theresults are released. Do not work on individual assignment with other students. – You canhelp someone by explaining concepts, demonstrating skills, or directing them to the relevantresources, but not doing any part of the assignment for them or with them or showing themyour work is inappropriate. An unacceptable level of cooperation between students on anassignment is collusion and is deemed an act of Academic Misconduct. If you are not sureabout plagiarism, collusion or referencing, simply contact your lecturer or unit coordinator.• You may be asked to explain and demonstrate your understanding of the work you havesubmitted. Your submission should accurately reflect your understanding and ability to applythe unit content and the skills learnt from this unit.• Before submitting your workshop, make sure you have checked all items in the AcademicIntegrity tick-before-submit checklist below and watch the video by clicking the link next tothe checklist image:Watch this video before submitting your assignment 6 Workshop 3 Marking GuideMarking criteriaMarks allocatedDesign/4Structs, Arrays and Strings and repetition/3Code legibility (comments, formatting/indentation etc.)/3Functions/pointers/2Control structures (loop, decision, etc.)/2Compilation/2Output/2Overall (e.g., code functioning, submission as per submissionrequirement and design/coding requirements, etc.)/2Bonus(/2)Total:/20 7Rubric Not proficientLow ProficiencyDeveloping ProficiencyModerateProficiencyHigh ProficiencyMarksAllocatedDesign0Design not present ordoes not meetrequirements1Design has logical flaws ordoes not meet allrequirements2Design meets somerequirements but not all orhas significant formattingissues3Design meets most requirementsbut has some issues4Design meets allrequirements4Struct/array& repetitionetc.0Structs/arrays/repetitionnot present1Structs/arrays are present butare poorly used/havesignificant errors2Structs/arrays work but havesome small errors3Arrays work to storeexpected results3CodeLegibility0Code is very difficult toread1Code has many readability issuessuch as poor naming conventionsor lack of indenting2Code has some readability issuessuch as poor naming conventionsor lack of indenting3Code is well writtenand highly readable3Functions/pointers0Functions not present,break scope or use globalvariables1Functions are present butare poorly structured,contain some errors, orsome functions are missing2Functions arepresent and work asintended2Controlstructures0Loops not present1loops are present but arepoorly structured, containsome errors2Loops are present andwork as intended2Compiling0Code does not compile1Code compiles with someerrors/warnings2Code compiles withno warnings2Output0Output is incorrect or notformatted as required1Output is correct but couldbe formatted better2Output is correctand formatted asindicated2Overall0Code doesn’t function.Submission, design /codingnot meet requirements1Code has functioning issues,design/coding and submissionpartially followed requirements2Code function well;design/coding andsubmission followedrequirements2
Related Posts
Question 1 Janet Brown is 45 and divorced. She has two children who live with her and are dependent on her. Stephen is 12. Sarah is 17 and has been certified as eligible for the disability credit. Janet’s financial information for 2019 and 2020 includes the following: 2020 2019 Salary and taxable benefits $105,000 $100,000 Car expenses deducted in computing employment income
Uncategorized / By
Scenario: You are employed by Pacific IT Solutions as a solutions integrator. Your job description is to implement IT solutions and provide customer support. One of your long-time customers, Western Mining, has their head office in Sydney and is opening a branch office in Brisbane. You have been contracted to setup the network. A meeting has been held to start the project. The minutes of the meeting are as follows:
Uncategorized / By