合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

        COMP1039代做、代寫Java程序語(yǔ)言

        時(shí)間:2024-05-07  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



        COMP1039 Coursework 2 (15 Marks) 
        Release Date: 8 April 2024 18:00 
        Deadline: 6 May 2024 18:00 
         
        Your Task 
         
        A farmer with his wolf, goat, and cabbage come to the edge of a river they wish to cross. There is 
        a boat at the river’s edge, but, of course, only the farmer can row it. The boat also can carry only 
        two things (including the rower) at a time. If the wolf is ever left alone with the goat, the wolf will 
        eat the goat; similarly, if the goat is left alone with the cabbage, the goat will eat the cabbage. 
        Implement the problem in Haskell, and use a search algorithm to find the solution. 
         
        Suppose that the function is called solutionPath. The initial state is ['w', 'w', 'w', 
        'w'], in which the four w’s represent the position of the farmer, wolf, goat, and cabbage 
        respectively, at the west bank of the river. The final state is ['e', 'e', 'e', 'e'] in which 
        the four e’s represent the position of the farmer, wolf, goat, and cabbage respectively, at the east 
        bank of the river. 
         
        We can apply the function to find the solution path as follows: 
         
        solutionPath [['w', 'w', 'w', 'w'], ['e', 'e', 'e', 'e']] 
         
        One possible returned solution path is as follows: 
         
        The solution path is interpreted as follows: 
         
        [ F, W, G, C ] [ Farmer, Wolf, Goat, Cabbage ] 
        ['w', 'w', 'w', 'w'] Farmer, Wolf, Goat, and Cabbage are at the west bank of the river 
        ['e', 'w', 'e', 'w'] Farmer takes the Goat across to the east bank 
        ['w', 'w', 'e', 'w'] Farmer returns to the west bank alone 
        ['e', 'e', 'e', 'w'] Farmer takes the Wolf across to the east bank 
        ['w', 'e', 'w', 'w'] Farmer returns with the Goat to the west bank 
        ['e', 'e', 'w', 'e'] Farmer takes the Cabbage across to the east bank 
        ['w', 'e', 'w', 'e'] Farmer returns alone to the west bank 
        ['e', 'e', 'e', 'e'] Farmer takes the Goat across to the east bank 
        Finally, all four of them are at the east bank.  
        Your Submission 
         
        Please ensure that your report is formatted in Microsoft Word and contains the following sections: 
         
        Section A: Solving the Farmer Crosses River Puzzle using State Space Search (4 marks) 
        In this section, provide an explanation in no more than 500 words on how you can solve the Farmer 
        Crosses River puzzle using the state space search problem-solving technique. Utilize a figure to 
        illustrate clearly how your search algorithm traverses either a tree or a graph. 
         
        Section B: Haskell Source Code (4 marks) 
        Include your Haskell program without any remarks/comments. Your program will be evaluated 
        based on the following criteria: 
        • Correctness: The program should produce the required output with correct input. 
        • Conciseness: Aim for brevity while ensuring the program meets the required specifications. 
        • Adherence to Functional Programming Practices: The code should follow good functional 
        programming practices. 
        • Utilization of List Structure: Represent the problem states using list structure ([F, W, G, C] 
        as demonstrated). 
         
        Section C: Experimentation with the Program (Input-Output Sessions) (4 marks) 
        Include up to 5 screenshots showcasing the output of your experiments. These screenshots should 
        depict the solution paths generated when given initial and final states as input. Your program will 
        be assessed based on the following features: 
         
        • Ability to generate all possible solution paths, representing safe ways of crossing the river. 
        • Effective functionality even when one or two of the wolf, goat, or cabbage are already on 
        the opposite side of the river. 
        • Identification of the shortest solution path. 
        • Ability to inform the number of trips required to get everything across the river safely. 
         
        Section D: Discussion on Solving the Same Problem in OOP Way (3 marks) 
        Provide an explanation in no more than 300 words on how you can solve the Farmer Crosses River 
        puzzle in Object-Oriented Programming way using Java. You should compare and contrast them 
        in terms of programming styles (not syntax), such as inheritance, polymorphism, function 
        overloading, as well as the imperative and declarative nature of the paradigms. 
        Submission Instructions 
         
        There are two files to be submitted: a report in Microsoft Word (e.g., Report.docx), and a Haskell 
        program source file (e.g., Farmer.hs). Please ensure that all your files are compressed into a single 
        zip file. The file should be named according to the following format: STUDENTID_NAME.zip 
        (e.g., 20514000_Danting_Wang.zip). 
         
        Once your files are organized and zipped, submit the zip file onto the Moodle page. Note that each 
        subsequent submission will overwrite the previous one. If you submit multiple times, please verify 
        that your last submission includes all the necessary files. 
         
        After submission, please review your submission to ensure that it is complete and executable. Past 
        experiences have shown that submitted files may occasionally be corrupted. You will receive a 
        zero mark if your submitted file is corrupted or not executable. 
         
        For late submissions, the standard late submission policy applies, resulting in a 5% deduction for 
        every 24-hour period, including weekends and public holidays. 

        Plagiarism 
        If you utilize code sourced from a textbook or the internet, you must acknowledge its origin. 
        Plagiarism detection tools will be employed to check for similarities between submissions and the 
        online content. We would like to remind you of the School's Policy on Plagiarism. While recent 
        advancements in AI and large language models (LLMs) such as ChatGPT have presented good 
        opportunities of using them, it is crucial to note that the University considers the use of such 
        technologies as potentially constituting misconduct. 
         
         Recommended Learning Materials 
         
        Welcome to the Farmer, Wolf, Goat, and Cabbage Problem 
        https://www.d.umn.edu/~gshute/cs2511/slides/javascript/code/solve/solve.html 
        There is a simple animation to help you understand the Farmer Crosses River puzzle better, before 
        you start to implement a solution. 
         
        AI Algorithms, Data Structures, and Idioms in Prolog, Lisp, and Java 
        https://www.cse.sc.edu/~mgv/csce580sp15/Luger_0136070**7_1.pdf 
        There is a good discussion about implementing the Farmer Crosses River puzzle using Prolog 
        (logic programming), Lisp (functional programming), and Java (object-oriented programming). 
         
        Graph theory: wolf, sheep and cabbage 
        https://www.youtube.com/watch?v=pBT-8gqhHzo 
        This videoclip provides a simple and easy to understand presentation on how to solve the Farmer 
        Crosses River puzzle using a graph search method. 
         
        Goat, cabbage, wolf 
        https://www.uni-weimar.de/fileadmin/user/fak/medien/professuren/Webis/teaching/ws14/searchalgorithms/wolf-goat-cabbage.html

        There is a good discussion on how to formulate the Farmer Crosses River puzzle as a search 
        problem. 
         
        A little bit of Lisp 

        There is a discussion about the Farmer Crosses River puzzle in Lisp. 
         請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp













         

        掃一掃在手機(jī)打開當(dāng)前頁(yè)
      1. 上一篇:代寫COMP282 程序、C++設(shè)計(jì)編程代做
      2. 下一篇:菲律賓旅游簽?zāi)艹鼍沉魧W(xué)嗎(留學(xué)簽證如何辦理)
      3. 無(wú)相關(guān)信息
        合肥生活資訊

        合肥圖文信息
        出評(píng) 開團(tuán)工具
        出評(píng) 開團(tuán)工具
        挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
        挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
        戴納斯帝壁掛爐全國(guó)售后服務(wù)電話24小時(shí)官網(wǎng)400(全國(guó)服務(wù)熱線)
        戴納斯帝壁掛爐全國(guó)售后服務(wù)電話24小時(shí)官網(wǎng)
        菲斯曼壁掛爐全國(guó)統(tǒng)一400售后維修服務(wù)電話24小時(shí)服務(wù)熱線
        菲斯曼壁掛爐全國(guó)統(tǒng)一400售后維修服務(wù)電話2
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國(guó)24小時(shí)客服熱線
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國(guó)24小時(shí)
        海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
        海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
        合肥機(jī)場(chǎng)巴士4號(hào)線
        合肥機(jī)場(chǎng)巴士4號(hào)線
        合肥機(jī)場(chǎng)巴士3號(hào)線
        合肥機(jī)場(chǎng)巴士3號(hào)線
      4. 上海廠房出租 短信驗(yàn)證碼 酒店vi設(shè)計(jì)

        主站蜘蛛池模板: 91成人爽a毛片一区二区| 亚洲国产av一区二区三区| 国产一区二区三区福利| 国产主播一区二区| 国产午夜精品一区二区三区极品 | 国产精品一区二区三区久久| 91福利国产在线观看一区二区| 亚洲精品国产suv一区88| 2014AV天堂无码一区| 精品女同一区二区三区免费播放| 精品国产a∨无码一区二区三区| 国产天堂一区二区综合| 日韩免费视频一区| 亚洲AV无码片一区二区三区| 人妻少妇久久中文字幕一区二区 | 另类免费视频一区二区在线观看| 成人精品一区二区三区电影| 91精品福利一区二区| 蜜臀AV免费一区二区三区| 亚洲熟妇av一区二区三区漫画| 国产另类ts人妖一区二区三区| 日本中文一区二区三区亚洲| 国产伦精品一区二区三区精品| 精品国产一区二区三区| 亚洲A∨精品一区二区三区下载| 国产精品一区二区久久| 中文字幕亚洲综合精品一区| 亚洲乱码日产一区三区| 国产在线无码视频一区二区三区| 亚洲韩国精品无码一区二区三区| 国产在线精品一区二区高清不卡 | 亲子乱av一区二区三区| 国产成人精品一区二区三区 | 无码精品一区二区三区免费视频 | 精品乱码一区二区三区四区| 久久久国产精品一区二区18禁| 亚欧成人中文字幕一区| 91精品福利一区二区三区野战| 中文字幕在线不卡一区二区| 国产精品av一区二区三区不卡蜜| 亚洲国产欧美日韩精品一区二区三区 |