讲解:KXO151、Programming、Java、JavaSQL|Java

KXO151 Programming & Problem SolvingAIEN-SOU - 2019Assignment 3Due Date & Time: 10pm (Shanghai) Friday, Week 14, 31 May, 2019Maximum Weight: 30% (of the total assessment for KXO151)Submission: Via MyLONOTE: All assignments will be checked for plagiarism by a specialist Javaprogram that checks your assignment against other student’s assignments aswell as the Internet (including help sites). For more information see:www.ics.heacademy.ac.uk/resources/assessment/plagiarism/demo_jplag.htmlAssignment Type: Group: 2 students in each group. Students are free to choose who they joinwith. A group sign-up sheet is available on the KXO151 MyLO site.NOTE: Students who have not signed into a group by Friday, 17 May, 2019,will be assigned into a group without consultation.NOTE: Each contributing student within the group will receive the samemark, however, active participation and equal contribution is required fromeach member of the group. Students who are found to have not participatedand / or equally contributed to the assignment work will not be included inthe group’s mark. If there is an issue with a student not participating and / orcontributing to your group, please contact your lecturer.Cover Sheet: The School requires that a group cover sheet listing the members of yourgroup be submitted with your assignment.The Programming TaskBeware - the version that you implement must match the specifications given below and usethe resources provided (even if you prefer some other variant of the task). Otherimplementations will score poorly.The code you are to write is to complete a simulation of finding a celebrity (such as a moviestar) and convincing him/her to fall in love with you!You will search the streets of Los Angeles (of USA) for your favourite celebrity. When youfind them youll try to convince them to fall in love with you. Obviously, youll do this byshouting at them from a distance. If you do so three times, then you will convince them andyou will go off together happily ever after. If, however, you encounter one of their securityguards then you will be dazed for two moves -- run into the security detail while youredazed and the game is also over. You can shout while dazed but you will stay dazed; youmust move twice to clear your head. But dazed or not, you can only erroneously call out toyour beloved three times -- if you shout in the wrong direction three times, you arearrested for disturbing the peace and placed in an asylum. Game over.If you are not dazed then it is possible for you to have some idea of your location, thestreets around you, and the location of your celebrity (because the noise the paparazzi ismaking gives their location away).KXO151 - AIEN-SOU – Assignment 3 - 2019Page 2 of 7The completed implementation will consist of three (3) files, only one of which must bewritten by you. These files are: Asst3.java - This is the driver program (with a main() method). The code ofthis is complete and it MUST NOT be changed. The code in this file is very simple -- itdeclares and instantiates an object of the CelebStalker class and calls itsplay() method. CelebrityBot.java - This is a library class and this file contains resources thatyou are to use in developing your implementation of the task. The code is completeand MUST NOT be changed. CelebStalker.java - This is an organiser class and is the file that you are towrite. There is a skeleton version of the code - use this as the starting point foryour program.o There will be no main() method in the class, it will contain methods thatorganise the task. This will include all the interactions with the user.o You should make sure that you do the following: Create and use object(s) of the CelebrityBot class. You will LOSEMARKS if you write code in CelebStalker.java that duplicatesthings that could be done using methods of the CelebrityBot class. Use the trace() method (provided in the skeleton) to includetracing messages in your program - switch the messages off beforesubmission. Use separate methods to implement the separate tasks within thegame. Use instance variables to store data that is used or changed by morethan one method. Use local variables to store the data that is used by just one method.Details on Writing Code in CelebStalker.javaWrite code in CelebStalker.java to do the following: Housekeeping tasks -- -- CelebStalker()o Instantiate the CelebrityBot and Scanner classes.o Switch on the debugging/tracing messages in the CelebStalker andCelebrityBot classes. (Switch them off before you submit your programfor assessment.) Introduction -- explain()o Provide the user with a general explanation of the game. Play the game -- after entering the gender of their desired celebrity the game isstarted with a celebrity chosen at random, the user is prompted to make movesuntil the game is over.o The game will end when any one of the following happens: The user tries to move to the street occupied by the celebrity whenthey are dazed. The user shouts their love to empty streets three times. The user shouts their love to the celebrity three times. The user chooses to quit the game.KXO151 - AIEN-SOU – Assignment 3 - 2019Page 3 of 7o Before each move the user is provided with information. If they are dazedthen they are only told the name of the celebrity with whom theyre in love,otherwise they are told: The celebritys name and the players current location (streetnumber) in the Los Angeles road system. The numbers of the four connecting streets. The number of times they have declared their love successfully andunsuccessfully. Any available information about the location of the celebrity -- i.e.whether the paparazzi has been detected.o The user is asked what they want to do for this turn. The options are: Walk into another street (by number).The player will be asked to enter the number of the street theywant to walk into. If the street is not connected to their current location they willnot be able to walk, and should be told so. Otherwise if the street is connected to their current location,they will enter the new street and, if the new street doesntcontain the celebrity the game will continue (with the playerbecoming slightly less dazed if they were dazed); if the newstreet does contain the celebrity and the player was alreadydazed then the game is over, otherwise they become dazed andthe celebrity flees. Shout into another street (by number). The player will be asked to enter the number of the street theywant to shout into. If the street is not connected to their current location, they willbe told this. If the street is connected and contains the celebrity then it isnoted that they have declared their love and the gamecontinues. When this occurs three times, the celebrity isseduced and the game ends. If the street is connected but doesnt contain the celebrity thenit is noted that theyve disturbed the peace and the gamecontinues. When this occurs three times, the player is arrestedand the game ends. Reset the Game. If this option is chosen then many game parametersare reset: a new celebrity (of the same gender) is chosen. the players position is changed. the celebritys position is altered. the players head is cleared (i.e. they are not dazed) the shouting tallies are reset to 0. Quit the game. The game will end. Before playing, the user is asked whether or not they want to play, if not, there is nogame played. After each game is over, the user is asked whether they want to play again. The numbers of the streets that the user enters should also be remembered (to a maximumof 20 moves and then the most recent 20 should be remembered). These values (in KXO151 - AIEN-SOU – Assignment 3 - 2019Page 4 of 7chronological order) should be displayed at the end of the game. See sample output formore information.A sample output of the assignment is enclosed within this assignment information package.Use it as a guide to develop your version of the game.PlanningThe first thing that you need to do is to understand what uses can be made of objects of theCelebrityBot class. To do this: Read the code carefully, making sure that you can identifyo instance variableso methods - read the header comments and the code of these and work out what theydo. Write a driver program to instantiate an object of the CelebrityBot class and call itsmethods (to check that they behave the way that you think they do). Plan how to write code to organise the CelebStalker activity (using object(s) of theCelebrityBot class)o Work out the subtasks that will be needed (each of these should be implemented asa method).o Work out the data that will need to be shared by more than one method. Thesewill usually be implemented with instance variables.o For each method work out: the data it will need to have passed in (parameters) the data it will need to pass out (return value) the algorithm for doing the subtask Implement each step after you have planned it - a little bit at a time - compile and test theimplementation as you go.DocumentationYour program files should be fully documented, at least to the same standard as demonstrated inthe textbook. This includes in-code comments, descriptions, and where appropriate, explanationsfor each new constructor, method and variable. Documentation also includes the layout of the Javacode and the data printed out to the screen, which should both be in a clear and professionalformat.Important Notes:PLEASE NOTE: This assignment is to be completed by students in groups of 2. If you need help,please look at the textbook or ask your lecturer. Students who have been working through thetutorial exercises should have no difficulty in completing this assignment.PLEASE NOTE: The submitted Java code must be able to be compiled from the command line usingJavac the Java programming language compiler command, or from a basic editor such aKXO151留学生作业代做、Programming作业代写、Java课程作业代做、代写Java编程语言作业 代做数据库Ss jGrasp. Beaware that development programs such as Eclipse often use features only available when run usingtheir system, meaning that their code may not run on a system without their development program.Programs that do not run from the command line using javac (to compile) and java (to run) becauseof a missing development program feature will fail the assignment. Changing a few variable names, adding different data and / or adding your name to the topof someone else’s code does not make it your own work. See the section on ‘Plagiarism’below.KXO151 - AIEN-SOU – Assignment 3 - 2019Page 5 of 7 Before you submit your assignment through the KXO151 MyLO website, it is suggested thatyou make sure the final version of your Java program file compiles and runs as expected –do not change the names of the java file – submit it exactly as you last compiled and ran it.PROGRAMS THAT DO NOT COMPILE AND / OR RUN WILL FAIL THE ASSIGNMENT. If in doubt, you canclick on the submitted files, download them from MyLO, and check that they are the filesyou think they should be. Only one complete submission is required from each group. It is up to the members of the group to make sure their assignment files have beensubmitted correctly.Program StyleYour program should follow the coding conventions introduced in this unit and shown in thetextbook, especially: Variable identifiers should start with a lower case letter Final variable identifiers should be written all in upper case and should be declared beforeall other variables Every if-else statement should have a block of code for both the if part and the else part (ifused) Every loop should have a block of code (if used) The program should use final variables as much as possible The keyword continue should not be used The keyword break should only be used as part of a switch statement (if required) Opening and closing braces of a block should be aligned All code within a block should be aligned and indented 1 tab stop (approximately 4 spaces)from the braces marking this blockCommenting: There should be a block of header comment which includes at least file name your name (in pinyin) student UTas id number a statement of the purpose of the program Each variable declaration should be commented. There should be a comment identifying groups of statements that do various parts of thetask. There should not be a comment stating what every (or nearly every) line of the codedoes - as in:num1 = num1 + 1; // add 1 to num1KXO151 - AIEN-SOU – Assignment 3 - 2019Page 6 of 7Guide to Assessment and Expectations:The assessment of Assignment 3 is based on the following criteria:Criteria High Distinction Distinction Credit Pass FailWorking JavaClasses /ProgramProvided a completeworking set of Javaclasses that fullysatisfy therequirements statedin the assignmentrequirements,including easy to useinterface, usingArrays, and correctuse of namesProvided a completeworking set of Javaclasses that satisfy therequirements statedin the assignmentrequirements,including easy to useinterface, usingArrays, and correctuse of namesProvided a completeworking set of Javaclasses that satisfy themajor requirementsstated in theassignmentrequirements,including a relativelyeasy to use interface,using at least 1 Array,and correct use ofnamesProvided a completeworking set of Javaclasses that satisfymost of the major therequirements statedin the assignmentrequirements,including a usableinterfaceFailed to provide acomplete working setof Java classes thatsatisfy therequirements statedin the assignmentrequirements & / orfail to compile & / orrunDocumentationProvided completedocumentation of allsignificant & relevantaspects of the Javaclasses.Submission of correct& correctly namedfiles, & coversheetProvided reasonablycompletedocumentation ofsignificant & relevantaspects of the Javaclasses.Submission of correctfiles & coversheetProvided gooddocumentation ofsignificant & relevantaspects of the Javaclasses.Submission of correctfiles & coversheetProvided somedocumentation ofsignificant & relevantaspects of the Javaclasses.Submission of correctfiles & coversheetFailed to providedocumentation ofsignificant & relevantaspects of the Javaclasses, & / or failedto submit coversheetOverallProgramDesign(Understanding ofJava)Demonstratedexcellent clear andlogical design skills –shows considerableevidence of planningat a very professionallevel. Design is logical,and is a completesolution to theprogrammingproblem. Showsevidence of thoroughtesting of the solutionDemonstrated verygood design skills –shows evidence ofbeing planned in alogically way.Program is a verygood solution to theprogrammingproblem, and is athoroughly testedsolutionDemonstrated gooddesign skills - showsevidence of beinglogically designed anda good solution to theprogrammingproblem. Is anadequately testedsolutionDemonstrated basicdesign skills – showssome evidence ofbeing a logicallydesigned solution tothe programmingproblem, and most ofthe methods returnthe correct valuesFailure todemonstrateadequateunderstanding of thenature of Java.Little or no evidenceof any planned design– little or no form orstructure.NoteThe High Distinction grade is reserved for solutions that fully meet the requirements & are highly distinguished fromother assignments by their high quality work, their attention to detail, & by demonstrating a high-level an understandingand ability to program using the Java language (usually only 10% of students).Submitting Your AssignmentOnly one complete submission is required from each group.You need to submit your assignment package containing the following 3 files to the unitMyLO site:Asst3.java, CelebrityBot.java, CelebStalker.javaFollow these steps to create a package for your assignment files and then submit your package file:1. Ensure that you add the names and the UTAS ID numbers of both students of your group into theclass header of each of the 3 files, as comments.2. On your computer desktop, create a new folder using your name and UTAS ID number. Forexample, if your name is Jianwen CHEN and your UTAS ID number is 111222, then the new foldermust be named Chen_Jianwen_111222;3. Copy your 3 assignment files into the new folder;4. Compress the new folder and name it as a RAR file (or ZIP file). For example, Jianwen CHEN couldname it as Chen_Jianwen_111222.rar.KXO151 - AIEN-SOU – Assignment 3 - 2019Page 7 of 75. Submit your RAR file (or ZIP file) to the unit MyLO site. While submitting, include the names andUTAS ID numbers of both students as comments.You must also submit a signed group coversheet to your local lecturer by the assignment duedate. The group coversheet is also on the unit MyLO site, under Assessment.In submitting your assignment you are agreeing that you have read the “Plagiarism and AcademicIntegrity” section below, and that your assignment submission complies with the assignmentrequirement that it is your Group’s own work.Students who believe that this method of submission is unsuitable given their personalcircumstances must make alternative arrangements with their Lecturer prior to the submissiondate.Extensions will only be granted under exceptional conditions, and must be requested withadequate notice on the Request for Extension forms.Plagiarism and Academic IntegrityWhile students are encouraged to discuss the assignments in this unit and to engage in activelearning from each other, it is important that they are also aware of the University’s policy onplagiarism. Plagiarism is taking and using someone elses thoughts, writings or inventions andrepresenting them as your own; for example downloading an essay wholly or in part from theinternet, copying another student’s work or using an author’s words or ideas without citing thesource.It is important that you understand this statement on plagiarism. Should you require clarificationplease see your unit coordinator or lecturer. Useful resources on academic integrity, includingwhat it is and how to maintain it, are also available at: www.academicintegrity.utas.edu.au/.AcknowledgementThis assignment has been adapted from a programming project developed by Dr Julian Dermoudy. The assignment templatewas written by Dr Dean Steer. Both authors are members of School of Technology, Environments and Design, University ofTasmania, Australia.(The End)Plagiarism is a form of cheating. It is taking and using someone elses thoughts, writings orinventions and representing them as your own; for example, using an authors wordswithout putting them in quotation marks and citing the source, using an authors ideaswithout proper acknowledgment and citation or copying another student’s work.If you have any doubts about how to refer to the work of others in your assignments, pleaseconsult your lecturer or tutor for relevant referencing guidelines, and the academic integrityresources on the web at: www.academicintegrity.utas.edu.au/.The intentional copying of someone else’s work as one’s own is a serious offence punishableby penalties that may range from a fine or deduction/cancellation of marks and, in the mostserious of cases, to exclusion from a unit, a course or the University. Details of penalties thatcan be imposed are available in the Ordinance of Student Discipline – Part 3 AcademicMisconduct, see: www.utas.edu.au/universitycouncil/legislation/The University reserves the right to submit assignments to plagiarism detectionsoftware, and might then retain a copy of the assignment on its database for thepurpose of future plagiarism checking.转自:http://www.7daixie.com/2019052248576162.html

你可能感兴趣的:(讲解:KXO151、Programming、Java、JavaSQL|Java)