Programming Exercise III: My Grocery Shopping (Finding Prices)
(Industry-Level, Second-to-None Comprehensive Specifications)


Absolutely no copying others’ works

Development Requirements
When start developing the exercise, follow the requirements below: Due Date and Submission Methods
Due on or before Monday, November 15, 2021:

Objective
This is the third part of the problem of finding a bus itinerary, and its objective is to have students practice Java programming. Keep in mind that the only effective way to learn a programming language is practicing, instead of studying concepts or writing some testing programs.
No pain, no gain 😂


Requirements
The requirements have to be followed precisely even though the developers may not agree with them. This is the third part of a bus-itinerary problem, which is to find the shortest bus itinerary. The exercise includes the following requirements:

Programming Hints
The four essential components of software are (i) algorithms, (ii) data structures, (iii) programming languages, and (iv) code, where algorithms are the most critical one. Finding a best bus itinerary is very complicated, and is most likely an NP-complete problem, which may not be solved in polynomial time. That is you have to find an approximation method to solve the problem because if it is not carefully planned, a brute-force or exhaustive method may take infinite time to find the answer. However, a brute-force or exhaustive method may just work well for a small amount of data.

This exercise is made simple on purpose, so it is not an NP-complete problem. Using appropriate data structures for this exercise could save a great deal of effort from you. An example of using the dynamic array ArrayList could be found at A travel-agent case study.



A User Interface
An example of the exercise’s interface is shown below:


Plagiarism-Proof
If the web interfaces are used, the instructor has the following requirements. It is for the instructor to find any plagiarism. Each interface includes a button “Display source,” which is to list ALL the source code for implementing the functions of this interface. Only one password is for all exercises and interfaces. The system will be highly suspected if fail to implement this button. The source code will be studied carefully for any suspected plagiarism. Besides, the exercise is suspicious if the results are substantially different from the assumed results from the code. The interface can be found from here.

~/public_html/course/280/exercise/3/check.html
Password:       Interface:                    

Evaluations
The following features will be considered when grading:



      Recently my wife and I were sitting in our den together,    
      she was reading and I was watching pro wrestling.    
      I told her, “In case it ever comes up,    
      I would hate to ever live in a vegetative state, dependent on a machine.    
      If that time ever arrives, please pull the plug.”    
      She immediately got up and unplugged the TV.