Final Term Paper Mobile Application Development - Lab
Final Term Paper Mobile Application Development - Lab
RAWALPINDI CAMPUS
Final Term Examinations Lab (Spring-2020)
Time to Solve and Submit to EXAM LMS: 5 Hours Date: 28 July, 2020
Note: Be brief and to the point. Attempt all the scenarios in the question. Please mention your
name, section and reg# on the solution file also.
Q No. 1: Marks 35
Instructions:
In this assignment you will add screens to the app that allow the user to solve the Farmer,
Wolf, Goat and Cabbage (FWGC) problem
This will involve porting the non-GUI aspects of your Java Problem Solver project to your
Android Problem Solver project.
For this task, when the user clicks one of these buttons, a solver screen is presented.
Page 1 of 8
Displays of the current and goal states
The number of moves attempted so far
Buttons for the moves
An area for messages to be displayed
A button to reset the problem
A button to automatically solve the problem
A button to show the next move in an automatically generated solution
An area for automated solution statistics to be displayed
Behavior requirements with examples are shown through the menu at left.
Illegal Moves
Legal Moves
Solved and Reset
Automated Solving
In this FWGC example the user clicks TAKES WOLF in the start state.
Page 2 of 8
If the move is legal:
Page 3 of 8
The current state is updated and displayed
If the user solves the problem, a congratulatory message is displayed as shown below.
Page 4 of 8
If the user presses the Reset button:
This reset behavior is possible any time during step-through of an automated solution. In
addition, any components disabled during a step-through are re-enabled.
Page 5 of 8
The Solve button is enabled any time the user is trying to solve the problem.
More statistics can be displayed if your screen has space for them.
Here the user has clicked Solve in the start state of the FWGC problem.
Note that although the move buttons are not dithered out, they are indeed disabled. This
appears to be an Android glitch.
Page 7 of 8
Thank You
Page 8 of 8