Programming Exercise: My Meal Ordering
Part II: Input/Output
(Industry-Level, Second-to-None Comprehensive Specifications)
Absolutely no copying others’ works
Development Requirements
When start developing the exercise, follow the requirements below:
- The exercise has to be Internet-enabled (a trend of current IT systems).
- The system entry page must be located at “
http://undcemcs02.und.edu/~user.id/280/2/interface.html
” and all pages must be hosted by “http://undcemcs02.und.edu/~user.id/
”.
- The systems have to be active even after being graded until the end of this semester.
They will be re-checked for plagiarism from time to time.
Due Date and Submission Methods
Due on or before Monday, October 14, 2024.
Send the password for displaying the source code online (only one password for all exercises and functions) to the instructor.
Objective
An application of meal ordering is trivial, but its implications, such as searching and optimizing, could be significant.
Exercise I builds a static user interface.
The objective of this exercise is to make the interface work by including input and output functions.
Requirements
This is the second part of a meal-ordering application, which is to read, save, and list data.
The exercise includes the following requirements:
- (Given) (System reset: 05%)
The system can be reset, which is to clear all data stored in the database, files, and arrays, so the instructor can test the system by using only his own test data.
That is the system has to include a button such as “Clear system” at the system entry page.
The input data should not be erased unless specified, so the testing could be applied many times.
- (Given) (Entering food items: 05%)
Enter items one by one.
The data of an item includes
- a unique name such as French fries and double cheeseburger, and
- a price like $2.49.
- (Entering meal combos: 15%)
After entering all food items, enter combos one by one.
The data of a combo includes
- a unique number (assigned by the system automatically after being entered),
- a list of food items such as (French fries, coke, cheeseburger) and (Caesar salad, coke, double cheeseburger), and
- a price like $7.99, which is greater than the sum of all its food items’ prices.
- (Listing a specific food item: 15%)
After entering the item number, list its details including
- item name and
- item price.
- (Listing all food items: 15%)
List the details of all food items including
- item names and
- item prices.
- (Listing all combos: 15%)
List the details of all meal combos each including
- combo number,
- all food items of the combo, and
- combo price.
- (Listing a specific combo: 15%)
After entering the combo number, list its details including
- combo number,
- all food items of the combo, and
- combo price.
- (Plagiarism checking: 15%)
It is for the instructor to find any plagiarism.
Show the source code of Java, Perl, and HTML for each function after entering the correct password.
Only one password is for all exercises and functions.
The system will be highly suspected if fail to implement this button.
A User Interface
This is the second part of a meal-ordering application, which is to build an
application as follows:
Recommended Steps
Take the following steps to build your Programming Exercise II:
- For your convenience, here are the reference cards of Linux and Emacs.
- (Off-campus only) You may skip this step if you are on campus.
Otherwise, you may connect to the NDUS servers by using VPN (virtual private network) like GlobalProtect.
- Connect to the server “
http://undcemcs02.und.edu/~user.id/
” by using SSH (Secure Shell) like PuTTY (PC) or Termius (Mac).
- Sign in to your account by using your UND credentials.
- Execute the following command for the first time and only time.
Otherwise, your CGI scripts will not work.
shell> chcon -R -t httpd_sys_script_exec_t /home/USER.ID/public_html/cgi-bin
Swap out “USER.ID
” with your login name:
shell> chcon -R -t httpd_sys_script_exec_t /home/first.lastname/public_html/cgi-bin
- Create your web folders by using the Linux command
mkdir
such as
shell> mkdir public_html/2
shell> mkdir public_html/cgi-bin/
shell> mkdir public_html/cgi-bin/280
shell> mkdir public_html/cgi-bin/280/2
- Do not forget to open the folders that you just created such as
shell> chmod 755 public_html/*
shell> chmod 755 public_html/*/*
shell> chmod 755 public_html/*/*/*
- Enter the folder “
public_html/2
” by using the Linux command cd
such as
shell> cd public_html/2
- Create the web page by using an editor and open it such as
shell> emacs interface.html
shell> chmod 755 interface.html
- Enter the folder “
~/public_html/cgi-bin/280/2
” by using the Linux command cd
such as
shell> cd ~/public_html/cgi-bin/280/2
- Create the Perl scripts by using an editor such as
shell> emacs ClearSystem.pl
shell> chmod 755 ClearSystem.pl
- Create the Java scripts by using an editor and compile them such as
shell> emacs ClearSystem.java
shell> javac ClearSystem.java
- Open the files that you just created such as
shell> chmod 755 *
- Use a browser to check your result at
http://undcemcs02.und.edu/~user.id/2/interface.html
- 🍀 Good luck! 🍀
Evaluations
The following features will be considered when grading:
- Specifications:
- The instructor (or your assumed client) has given the exercise specifications as many details as he possibly can.
If you are confused about the specifications, you should ask in advance.
Study the specifications very carefully.
No excuses for misunderstanding or missing parts of the specifications after grading.
- The specifications are not possible to cover every detail.
You are free to implement the issues not mentioned in the specifications, but the implementations should make sense.
Implemented functions lacking of common sense may cause the instructor to grade your exercise mistakenly, and thus lower your grade.
- The exercise must meet the specifications.
However, exercises with functions exceeding the specifications will not receive extra credits.
- Grading:
- This exercise will not be graded if the submission methods are not met.
Students take full responsibility if the website/system is not working.
- Though these exercises are related, you are NOT allowed to submit one exercise to cover two or more exercises.
- A set of test data will be used by all students.
The grades are primarily based on the results of testing.
Other factors such as performance, programming styles, algorithms, and data structures will be only considered minimally.
For example, finding the lowest price could be an NP-hard problem.
Instead of finding an optimizing algorithm, an exhaustive search may be used to find the answer.
- Before submitting the exercise, test it comprehensively.
Absolutely no extra points will be given after grading.
- The total weight of all four exercises is 40% (10% each) of the final grade.
- If not specified, no error checking is required; i.e., you may assume the input is always correct for that case.
For example, the food items entered will always be valid names.
- The newest Firefox browser will be used to grade exercises.
Note that Internet Explorer, Edge, Chrome, and Firefox are not compatible.
That is your exercises may work on the IE, Edge, or Chrome but not Firefox.
- The systems have to be active until the end of this semester.
They will be re-checked for plagiarism from time to time.
- The instructor will inform you the exercise evaluations by emails after grading.
- Comments:
- Make the exercise work first.
Do not include extra features, such as fancy interfaces, in the beginning.
By the way, you will not receive credits for the extra features.
- Time management is critical for software development.
If you are not able to complete the exercise, display whatever you have accomplished, so the instructor can give partial credit to your exercise.
- The only effective way to learn a programming language is practicing, instead of studying concepts or writing some testing programs.
No pain, no gain 😂
“When someone loves you, the way they talk about you is different.
You feel safe and comfortable.”
― Jess C. Scott, The Intern
|