KIT501留学生程序 写作、 写作UNIX Scripting程序、C++程序

” KIT501留学生程序 写作、 写作UNIX Scripting程序、C++程序KIT501 UNIX Scripting AssignmentDue Date: 3:00pm Friday the 9th of October – Week 12IntroductionThere are two (2) shell programming tasks in this assignment. This is an individual assignment. Youare required to make a directory named kit501a2 under your home directory (on ictteach)and use kit501a2 as your working directory for this assignment.Assignment submissions will be marked by the KIT501 tutors on ictteach (also known asalacritas). If you write and test your scripts elsewhere its your responsibility to ensure that yourscripts run correctly on the School UNIX system (ictteach). You must also submit your assignmentvia this server (see later).Please pay close attention to the Marking scheme shown on the last page. This scheme shows youhow marks are allocated, and what you must (successfully) achieve to receive marks. Note also thatyour scripts must have clear and tidy structure, have good use of indentation and whitespace (tomake the script readable), include appropriate comments, and have your identification details andthe scripts purpose Specified in comments at the top of your script.Task AWrite a shell script (to run on the Bourne shell) called cp2.sh to copy all the files from two nameddirectories into a new third directory. Time stamps must be preserved while copying files from onedirectory into another.For example:cp2.sh dir1 dir2 dir3This example will copy all of the files in dir1 and dir2 to dir3. Note: dir1, dir2 and dir3 are example directory names. Your script shouldnot check for these example values explicitly. Instead, your script should allow anydirectory names to be entered by the user, and then it uses those values enteredfor any further commands that refer to the directories.Continued on next pageKIT501 ICT Systems Administration Fundamentals Unix Scripting AssignmentKIT501留学生作业 写作、 写作UNIX Scripting作业Task Requirements1. Three directory names must be supplied as arguments to your script when it is executed bythe user.2. In the beginning of your script you need to check that the first two directory names provided(e.g. dir1 and dir2) exist Under the current directory. If they do not exist, your script mustdisplay an error message and then it should exit.3. The third directory argument to the script will specify a new directory name (for example,dir3). This directory must not Currently exist (i.e. the creation of e.g. dir3 should be oneof the actions of your script). If the directory already exists, your script should display anerror message and exit.4. The script will first copy all of the files from dir1 into dir3. Your script output mustindicate which files have been copied.5. The script will then copy every file from dir2 to dir3 subject to the following conditions:a. only copy if the file from dir2 is not already present in dir3; orb. only copy if the file from dir2 is newer than the same file in dir3. The newer filewill overwrite the existing version in dir3.Your script output must indicate which files have been copied.6. Clean up – remove all temporary files created (if any) at the end of your script.7. Your script must generate output similar to the example output shown below. HINT: You should note that the cp command without any option does notpreserve certain attributes (such as ownership and timestamps)Example outputThe following is a sample output of the script. The $ is the shell prompt.$ ./cp2.sh dir1 dir2 dir3These files from dir1 copied into dir3:a.c b.c file1.cThese new file(s) From dir2 copied into dir3:file2.cThese file(s) from dir2 copied into dir3 and overwrite(s) existing olderversions in dir3:a.cKIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment3The following sample outputs verify the result shown previously so you can see the example filenames and timestamps used.$ lscp2.sh dir1 dir2 dir3$ ls -l dir1total 12-rw-r–r– 1 sxu staff 9 Aug 2 12:52 a.c-rw-r–r– 1 sxu staff 9 Aug 2 12:52 b.c-rw-r–r– 1 sxu staff 9 Aug 2 12:52 file1.c$ ls -l dir2total 12-rw-r–r– 1 sxu staff 9 Aug 2 12:53 a.c-rw-r–r– 1 sxu staff 9 Aug 2 12:51 b.c-rw-r–r– 1 sxu staff 9 Aug 2 12:53 file2.c$ ls -l dir3total 16-rw-r–r– 1 sxu staff 9 Aug 2 12:53 a.c-rw-r–r– 1 sxu staff 9 Aug 2 12:52 b.c-rw-r–r– 1 sxu staff 9 Aug 2 12:52 file1.c-rw-r–r– 1 sxu staff 9 Aug 2 12:53 file2.cTask BDominion Consulting in Sydney needs a shell script (to run on the Bourne shell) to maintain itsemployee records file, which contains the following information (fields) about each employee: telephone number (8 digits, first digit non-zero); family name (alphabetic characters); first name (alphabetic characters); department Number (2 digits) and job title (alphabetic characters).This script should let users add, delete, search for, and display specific employee information.Continued on next pageKIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment4Task Requirements1. Create a text file named records containing the following records with fields delimited bycolons (:) :95671660:Jones:Sarah:45:sales manager93272658:Smith:John:43:technical manager98781987:Williams:Nick:35:computer officer99893878:Brown:Sarah:12:electrician95673456:Couch:David:26:chef95437869:Anderson:Sarah:19:CEO2. In the beginning of your script you need to check to see whether the required text file(records) actually exists under the current directory. If records does not exist, yourscript must display an error message and then exit.3. The script must be named menu.sh. The script must show a menu of operations (seerequirement 4) that a user may choose from. Among other tasks, these operations automatethe following four activities:1) Display all current employee records to the screen;2) Search for and display specific employee record(s) (search all fields, ignoring case);3) Add new records to the records file; and4) Delete records from the records file.4. The script must show the following menu and prompt the user to select an option:Dominion Consulting Employees Info Main Menu============================================1 Print All Current Records2 – Search for Specific Record(s)3 – Add New Records4 Delete RecordsQ – Quit5. After a user Chooses an option and the selected operation has been completed, the user isprompted to press the Enter key, and then the menu must be displayed again so that theuser can make another selection.Continued on next pageKIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment56. When adding a new employee record (option 3), the script must ask the user to provide thefollowing field values (in order):phone numberfamily namegiven namedepartment numberjob titleEach field must be correctly validated before the next field is requested. If validation fails,the user must be asked to enter the field again (and this process repeats until the field issuccessfully validated). After each successful employee record is added, the user should beprompted to ask if they want to enter another employee record (this process will continueuntil the User indicates they do not want to add another employee record).Validation is as follows: family name: must be alphabetic characters and/or spaces. given name: must be alphabetic characters and/or spaces. job title: must be alphabetic characters and/or spaces. phone number: the first digit of an eight-digit phone number must not be zero.Each telephone number must be unique (not already exist). department number: A valid department number must only contain 2 digits.7. When deleting records (option 4), the user must be prompted to enter a valid phonenumber. If the phone number is invalid, then the user will continue to be prompted untilthey enter a valid phone number. If a record matches the phone number entered (hint: asphone numbers are unique, only one record should match), then the matching record mustbe displayed, and the User must be prompted to confirm they want to delete the matchingrecord.Example outputHere is a sample output of the script which will indicate the main semantics of each option.The $ is the shell prompt. The items in italics Are not part of the sample output. They arehints indicating how your script should behave. Items in green are examples of user input.$ ./menu.shDominion Consulting Employees Info Main Menu============================================1 Print All Current Records2 – Search for Specific Record(s)3 – Add New Records4 Delete RecordsQ – QuitKIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment6Your Selection: 1(user input)95671660:Jones:Sarah:45:sales manager93272658:Smith:John:43:technical manager98781987:Williams:Nick:35:computer officer99893878:Brown:Sarah:12:electrician95673456:Couch:David:26:chef95437869:Anderson:Sarah:19:CEOPress Enter to continue… (user presses Enter here)Dominion Consulting Employees Info Main Menu============================================1 Print All Current Records2 – Search for Specific Record(s)3 – Add New Records4 Delete RecordsQ – QuitYour Selection: 5(user input)Invalid selectionPress Enter to continue… (user presses Enter here)Dominion Consulting Employees Info Main Menu============================================1 Print All Current Records2 – Search for Specific Record(s)3 – Add New Records4 Delete RecordsQ QuitYour Selection: 2(user input)Enter keyword: Sarah (user input)95671660:Jones:Sarah:45:sales manager99893878:Brown:Sarah:12:electrician95437869:Anderson:Sarah:19:CEOPress Enter to continue… (user presses Enter here)KIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment7Continued on next pageDominion Consulting Employees Info Main Menu============================================1 Print All Current Records2 – Search For Specific Record(s)3 – Add New Records4 Delete RecordsQ – QuitYour Selection: 2 (user input)Enter keyword: Monks (user input)Monks not foundPress Enter to continue… (user presses Enter here)Dominion Consulting Employees Info Main Menu============================================1 Print All Current Records2 – Search for Specific Record(s)3 – Add New Records4 Delete RecordsQ QuitYour Selection: 2(user input)Enter keyword: (user simply presses Enter without typing in anything)Keyword not enteredPress Enter to continue… (user presses Enter here)Dominion Consulting Employees Info Main Menu============================================1 Print All Current Records2 – Search for Specific Record(s)3 – Add New Records4 Delete RecordsQ QuitYour Selection: 3(user input)Add New Employee RecordPhone Number (xxxxxxxx): (user simply presses Enter without typing in anything)Phone Number not enteredPhone Number (xxxxxxxx): 00123456 (user input)Invalid phone numberPhone Number (xxxxxxxx): 95437869 (user input)Phone number existsPhone Number (xxxxxxxx): 99887766 (user input)Continued on next pageKIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment8Family Name: abc123 (user input)Family name can contain only alphabetic characters and spacesFamily Name: Warren (user input)Given Name: Tony5 (user input)Given name can contain only alphabetic characters and spacesGiven Name: Tony (user input)Department Number: 123 (user input)A valid department number contains 2 digitsDepartment Number: 23 (user input)Job Title: accountant1 (user input)Job title can contain only alphabetic characters and spacesJob Title: Accountant (user input)Adding new employee record to the records file New record saved (display this only after saving record is successful)Add another? (y)es or (n)o: n (user input note: allow for y,Y, n,N)(Note: if the user answer is y or Y here then the above procedure is repeated to allow another employee record tobe added)Dominion Consulting Employees Info Main Menu============================================1 Print All Current Records2 – Search for Specific Record(s)3 – Add New Records4 Delete RecordsQ QuitYour Selection: 4(user input)Delete Employee RecordEnter a phone number: 05671660 (user input)Invalid phone numberEnter a phone number: 99999999 (user input)Phone number not foundEnter a phone number: 95671660 (user input)95671660:Jones:Sarah:45:sales managerConfirm deletion: (y)es or (n)o: y (user input note: allow for y,Y, n,N)Record deleted. (This message is displayed only after this record has been successfully deleted from therecords file. (If the user answer is n then the main menu is displayed again. Then if the user enters Q or qthen the script is terminated.)KIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment9General RequirementsYou must: Include your full name, student ID, and a brief introduction of what the script does in allyour shell scripts, as a comment in the beginning of each script. Make your scripts run on the Bourne shell, regardless of which shell the user of yourscripts is currently using. Add in-line comments to help other people understand your scripts. Use newlines (\n) where appropriate to make the output of your scripts morereadable. Note that your script structure and layout are also important as they will be marked aspart of the assessment process.Submitting Your AssignmentYou must submit (copy) a single folder named kit501a2 which contains the following three (3)files to the kit501submit folder which will be automatically created for you in your ictteachaccount:cp2.sh, Menu.sh, recordsPlease ensure your kit501a2 folder only contains the three files as listed here, when you are readyto submit your assignment. WARNING: Do not create the kit501submit folder. It will be created for youcloser to the submission date. If you create this folder yourself, it will cause yourassignment to not be submitted correctly1. In the week prior to the assignmentdue date, if the kit501submit folder does not exist, please advise the UnitCoordinator. Without a kit501submit folder, you will NOT be able to submityour assignment. If you see this folder in your home directory, DO NOT DELETEIT.To submit your assignment, follow these two steps:1. Ensure that both your kit501a2 folder and the kit501submit folder are present underyour home directory (see the warning above);2. Type the following commands to copy your kit501a2 folder into your kit501submitfolder (the $ is the shell prompt):1 Why? The kit501submit folder is actually a soft-link to another folder elsewhere in the filesystem. If youcreate the folder yourself, it will not be linked to the correct submission master folder, meaning yourassignment will not be discovered or marked.KIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment10$ cd (This takes you back to your home directoryfrom anywhere)$ cp -r kit501a2 kit501submit (This copies your assignment folder into your kit501submitfolder. The option -r is important)$ ls -l kit501submit (This verifies that your assignment folder is now in yourkit501submit folder)$ ls -l kit501submit/kit501a2 (This verifies that your assignment files are now in yourkit501submit folder)If your assignment is late then you should submit your files to the kit501late folder. Thislate folder will be created immediately after the assignment due date and it will be availablefor one week only. Do not create this folder Yourself, it will be created automatically.Need Help?You are encouraged to seek assistance from your lecturer or tutor after you have seriously thoughtabout the assignment. Please note that we can provide general advice but you are expected towrite and debug (correct) your own code. Note: all of the knowledge you need for this assignment will have been discussed in theunits practical classes (up to and including week 10). Shell functions are discussed inweek 11 but you are not required to use these in your assignment. You do not need tofind additional syntax or commands from other sources (such as other websitesdiscovered via search engines like google). You are also expected to write your scriptsolutions using the particular methods of syntax as discussed in the unit.PlagiarismPlagiarism is a very serious matter, and ignorance of this is not an excuse. If you submit workclaiming it to be your own, and it is not original work of your own, this is cheating. This means forexample that you cannot submit code written by other students or sourced from the Internet andclaim you wrote the code yourself. Plagiarism can result in academic penalties both in relation toyour assignment, and also on your permanent university record.Acknowledgements:This assignment has been re-formatted and slightly modified from an assignment written by DrShuxiang Xu.KIT501 ICT Systems Administration Fundamentals Unix Scripting Assignment11KIT501 Assignment Marking Schemecp2.sh (for each item there are only 3 possible marks: 100% or 50% or 0%) Mark Out ofExecution of the shell scriptScript runs as expected (2).Script runs but not as expected (1).Script does not run (0)2Check that dir1 and dir2 currently exist and that dir3 does not currently exist. 2Copy all files from dir1 Into dir3 2Copy new files from dir2 into dir3 2Copy newer files from dir2 to dir3 and overwrite older versions 2menu.sh (for each item there are only 3 possible marks: 100% or 50% or 0%) Mark Out ofExecution of the shell scriptScript runs as expected (2).Script runs but not as expected (1).Script does not run (0)2Correctly set up a loop to repeatedly display the menu 2Correctly display all records 2Correctly search for specific records 2Correctly add new records 2Validate each field of a new record correctly when adding new records 2Correctly delete records 2Common (for each item there are only 3 possible marks: 100% or 50% or 0%) Mark Out ofShell scripts structure and layoutClear and tidy (4).Somewhat messy but understandable (2).Messy, confused, inconsistent (0)2Both scripts include name, ID, and brief introduction 2Appropriate in-line comments 2Assignment Total: /301COMP2120/COMP6120 SOFTWARE ENGINEERINGSemester 2, 2020Individual Assignment: CleanITDue 17:00 on Tuesday, 20/October/2020ALMOST FINAL DRAFT v.2.0, 20/09/2020Design Class Diagrams for CleanITIn your group assignment, you constructed Domain Models and Sequence Diagrams for the CleanITaircraft cleaning system. You will assume a Layered Software Architecture when building your DesignClass Diagrams.In this individual assignment you will extend your group work by drawing up a Design ClassDiagrams. These Design Class Diagrams will start to look very much like computer software. They willneed to reflect the real world of your Domain Model but they will include extra classes, linkagesand details to fully explain how the Domain Layer of your system might look.Note that you must state what your Group Number was when submitting your individualassignment.Task 1Draw up a Design Class Diagram for the base system (without the extension class) that your grouphas developed in the Group Project. Assume that you will have a layered software architecture inyour system. (5 marks)- You need to include an explanation of your Design Class Diagram that justifies how it willsupport your major Use cases (Tasks 1-6) and explain how it displays evidence of goodsoftware design.- If you have used any Management classes or Design Patterns in your Design Class Diagram,justify why including these design patterns makes your design better.Task 2Explain, without drawing it completely but perhaps using some illustrations, how your Design ClassDiagram will need to be modified to support the extension task (Task 7) that your group undertook.(3 marks)-As with Task 1, Include an explanation that justifies why your modified Design ClassDiagram is a good one. In particular, if you have used any management classes or DesignPatterns, justify why they make the design better.Task 3Over the lifetime of the CleanIT system, one could imagine that the software will need to evolvefurther to incorporate new requirements. Describe one example of substantial new requirementsthat could be realistic in the future and how your Design Class Diagram will be able to respond wellto these new requirements. (2 marks)-Your example should be a longer term modification that would require some major reengineeringand involve a modification of the vision statement in a way that you imagine2this business evolving in the future. Describe, in general terms, how that modification to thebusiness requirements would affect the engineering of your Design Class Diagram.Note: You are not expected to draw lots of diagrams for Task 3 if you can explain your ideas clearly.But you are welcome to include some diagrams if that helps with your explanation.Marking guideTask 1. Design Class Diagram for Tasks 1-6 of the Group Assignments (Up to 5 marks)a. 5.0 marks for excellent work, professionally- presented, apart from one or two veryminor issues. Your Design Class Diagram will be clearly labelled.i. Linkages will be reasonable and be as few as necessary to supportthe use cases and the sequence diagrams in your group assignment.Multiplicities will be correct.ii. You will have also submitted a statement explaining why yourdiagram is a good one. This statement will read clearly and yourexplanations will show realism, imagination and depth. You willconvince the reader that you have come up with a good design thatintegrates well with a layered architecture.b. 4.0 marks for very good work apart from a small collection of serious issues (perhaps twoor three serious issues). Examples are:i. Perhaps your diagram does not integrate well into a layeredarchitecture.ii. Perhaps your diagram is a bit Cluttered and it does not referenceyour domain model sufficiently.c. 3.0 for a Design Class diagram that looks OK but doesnt really support all of yoursequence diagrams and use cases, but with a good and thoughtful explanation whichmakes it clear that you have thought deeply about the task.d. 2.0 marks for a design class diagram that is vaguely OK but is not much more than asimple iteration on your Domain Model and doesnt really support your sequencediagrams. Your accompanying explanation might be a bit weak as well.e. 1.0 marks for a quite superficial submission but with some obvious thought involved.f. 0.0 marks for an absent submission.g. Half marks will be used where it is not clear which category is appropriate for thesubmission.Task 2. Design Class Diagram for Task 7 of the Group Assignments (Up to 3 marks)a. 3.0 marks for excellent work, professionally- presented, apart from one or two veryminor issues. Your Design Class Diagram will be clearly labelled. You will have alsosubmitted a statement explaining why your diagram is a good one. This statement will3read clearly and your explanations will show realism, imagination and depth. You willconvince the reader that you have come up with a good design that supports the Task 7of your group assignment.b. 2.0 marks for good work apart but with a small collection of serious issues (perhaps twoor three serious issues). Examples are:i. Perhaps your diagram does not really represent the ideas in yourgroup assignment as well as it might.ii. Perhaps your diagram is a bit cluttered and it does not referenceyour domain model sufficiently.iii. Perhaps you have not used good design principles to isolate andprotect parts of your software.c. 1.0 marks for a quite superficial submission but with some obvious thought involved.d. 0.0 marks for an absent submission.e. Half marks will be used where it is not clear which category is appropriate for thesubmission.Task 3. Future evolution of your Design Class Diagram (Up to 2 marks)a. 2.0 marks for an excellent explanation that is very convincing in your choice of yourexample and that convinces the reader that you have thought deeply about how yourDesign Model can be evolved. Your example will be very realistic and credible.b. 1.0 marks for an OK answer to this question but perhaps your examples was not veryconvincing or perhaps you were not able to justify your explanations of how the DesignClass Diagram would evolve.c. Half marks will be used where it is not clear which category is appropriate for thesubmission.Differential assessment for relative efforts in the Group Assignment based on marks for thisindividual assignment by different Group members.This assignment will be marked out of 10. It will be your own, individual mark.We will look at the differential spread of marks across all members of all groups for this individualassignment.Where this spread is greater than or equal to 20% (i.e. greater than or equal to plus or minus 10%about the average mark for all group members) and where there is zero existing variation in themarks for the group assignment (that is, all group members have the same mark for the groupassignment), then marks for the group assignment will be varied in proportion to the variation forstudents individual assignments up to a limit of plus or minus 10% of the group mark.如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导