HloProblem DescriptionOne day a farmer goes to the market, taking with him a cabbage and a goat. On the way he captured awolf, he’s a mighty farmer, and took it with him to the market. They came to a river. And on the Bank,there’s a boat. Now, the problem is that the boat just big enough to carry the farmer and one of the others.If the farmer leaves the wolf and the goat together, in his absence, the wolf would make a meal of the goat.Neither, could he leave the goat and the cabbage alone: the goat would eat the cabbage. Being used tohardship, the farmer was quite prepared to make several trips back and forth, just so long as he couldeventually bring them all to the other side and went on to the market. How should he arrange the trips?Figure 1. CLI version of the river crossing.Part 1 RequirementsYour task as a software developer is to write a Command Line Interface (CLI) applicationRiverCrossingCLI simulating the river crossing. The farmer (player) can then work out the steps requiredto safely move all items to the other side of the river. In Part 1 you will need to do two tasks:1. Your first task is to design and create a RiverCrossing class to represent the river crossing with theappropriate attributes and methods. Assume river flows west to east (left to right of the page),farmer moves north (straight up) and requires to transport items from the South Bank to NorthBank of the river. Design class so it can be re-used in Part 2 of the assignment, the GUI version ofRiver Crossing.(a) Write the RiverCrossing constructor.(b) Use a boolean (or integer) array elements as place holders for the Farmer’s items (boat,cabbage, goat, wolf). False value to represent an item located on the South Bank and Trueon the North Bank of river.(c) Write a row() method to transport an item from one Bank to another Bank.(d) Write get() methods to return string with inventory (a list of all items, including the boat)located on the North Bank and another get() method for the South Bank.(e) Write other methods as required.2. Write a Command Line Interface class with main method to allow the user to play the game. Asample of a dialogue between the computer and the user (farmer) trying to cross from the southBank to the north Bank:NIT2112 Object Oriented ProgrammingPage 4The above dialogs are meant as a sample only. You are at liberty to design the game in any way you likeand you should. In particular, you should inform the user the consequences of a bad decision, i.e., thecabbage or the goat was eaten and the game is overA sample of an UML diagram shows the class diagram forRiverCrossing class.Instance attributes are all private;• Bank[ ] array contains boolean values representing position ofan item, south Bank false and true if its in the north Bank• item[ ] array comprise of strings "boat", "cabbage", "goat","wolf"• other attributes as necessaryRiverCrossing Methods• RiverCrossing( ) constructor sets all item to false (south Bank)• getItemStatus(int item) returns a String with location of item i• getNorthBank( ) return String with north Bank inventory• getSouthBank( ) return String with south Bank inventory• row(int item) transport the boat with the selected item. Farmer is allowed to take an empty boatacross the river. The method returns the following integer codes:0 the move successful1 all items transported to north Bank, player won11 the selected item is already across the river, error code12 the goat ate the cabbage, end of the game13 the wolf ate the goat, end of the game14 the goat ate the cabbage and wolf ate the goat, end of the game.Part 2Create a Windows GUI (JFrame) application for launching RiverCrossing game.Choose GUI components that reduce user errors and provide a feedback to the player. For example, thereis no need for a “boat” button because “row” button always moves the boat with or without an item.One simple GUI interface is shown in the Figure 2 below. Click the button “row” to immediately row theboat across or to transport the wolf select button “wolf” followed by click on the “row” buttonFigure 2. Basic river crossing layout.Once again, this is only a sample interface to illustrate the idea of the game. You are free to choose yourown colour scheme and buttons. Movement can be achieved by clicking a button. Make use of layoutmanagers to design colourful and a well-organized game. Consider the following controls as a minimumrequirement:• one button to reset and start the game again,• a text field for the player’s name (a player may choose to leave it blank).• a text area to display a warning messages (and the past history), for example, “This is not a goodidea” or to inform the player that cabbage or the goat was eaten and game is lost. You can provideyour own appropriate messages.An advanced River crossing is shown in Figure 3. Full marks will be given to fully functional basic layoutbut additional marks may be given by better GUI as long it is fully functional.Figure 3. An example of advanced river crossing layout with button icons (pictures) and boat drawing.What do you have to hand in?An electronic copy of1. Readme.docx file with information on how to run your program. Include any extra informationabout your design and program that you wish the marker to know.2. Summary of tasks allocations—who did what?3. A word document with the evidence of trial runs of your program, i.e., screen printouts of the resultswhere you have tested all the features of your code.4. UML diagram for all classes in your program.5. Code for all the classes that has been compiled and are ready to run. (jGRASP will be used to runand test your application).6. A brief description of the class. At the start of each method, there should be a comment clearlydescribing what the method does.Each class should be fully documented commencing with a heading. In particular, the headingshould include your name, unit, assignment details, date written and a brief description of theclass. At the start of each method, there should be a comment clearly describing what the methodd