Assignment title: Information
ITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 1 of 7
ITECH5403 - Assignment 2 – Parallel Implementations
Due Date: 5pm, Friday of Week 11
This assignment will test your skills in programming applications to specification in a number of different
programming languages, and is worth 20% of your non-invigilated (type A) marks for this course.
Assignment Overview
You are tasked with creating a text-based program for taking orders at a roast dinner shop – however, as this
is a comparative languages course, you will be creating the same application in the following four
programming languages:
C or C++ (you may choose either of these),
Python,
Java, and
Lisp or Perl (you may choose either of these).
As you implement the application in each language, you should keep notes on the features of the languages
used, which you found useful, as well as any issues or complications which arose due to the complexity or lack
of any language features. A brief discussion based on these programming features for each individual
language accompanying each implementation is required. Finally, a comparative overview of the languages
highlighting how they were suitable or not suitable for the creating this type of application is also required.
It is recommended that the first application you write is in the programming language which is most familiar
to you, which will help you to have a working 'template' for taking orders - which you can then translate into
the other programming languages.
Program Specification
Users may order one or more Roast Dinners, where each dinner may be either: medium, large or extra large.
Medium dinners cost $10, large dinners cost $15 and extra large dinners cost $20.
Medium dinners come with one serve of meat (beef, chicken or pork) and two sides / vegetables.
Large dinners come with one serve of meat (beef, chicken or pork) and three sides / vegetables.
Extra large dinners come with two serves of meat (these may be different, or the customer may choose two
serves of the same meat i.e. one serve of beef and one serve or chicken is fine, and so is two serves of pork
etc.) and come with four sides / vegetables.
Figure 1 - A Roast Dinner with roast beef, roasted potatoes,
carrots, peas and Yorkshire Pudding with gravy.
ITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 2 of 7
Customers may choose to order any of the following sides / vegetables:
- Roast potatoes
- Carrots
- Peas
- Yorkshire pudding
- Gravy, and
- Broccoli.
Customers may choose from the following meats:
- Beef,
- Chicken, and
- Pork.
A dinner order consists of an order for one or more roast dinners, where each dinner has a size and a list of sides /
vegetables to go with it.
Each roast dinner order requires a name and a phone number for pickup/ Delivery is not available.
Customers may choose to add additional serves of meat at $4 per serve, or additional sides / vegetables at $2 per serve.
The application must be error tolerant and capable of accepting keyboard input to store a number of roast dinner
orders in memory (they do not have to be persisted to file), as well as displaying an order summary which include
details of all orders, including:
The details of each roast dinner in the order,
The total cost of the order, and
The name and phone number of the person who making the order.
ITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 3 of 7
Example Program Output
----------------------------------------
--- Welcome to FedUni Roast Dinners! ---
----------------------------------------
Could I take your name please?
Hungry Joe
And your phone number?
0123456789
What size dinner would you like? (M)edium, (L)arge or e(X)tra Large?
M
What meat would you like with that? (B)eef, (C)hicken or (P)ork?
B
Medium dinners come with two sides.
Available sides are:
- (R)oast Potatoes
- (C)arrots
- (P)eas
- (Y)orkshire pudding
- (G)ravy
- (B)roccoli
R
And your next side?
C
Thank you. Would you like to add a serve of (M)eat or a (S)side? (N)o
thanks.
M
What meat would you like with that? (B)eef, (C)hicken or (P)ork?
C
Thank you. Would you like to add a serve of (M)eat or a (S)side? (N)o
thanks.
N
Would you like to (A)dd a dinner to your order? (N)o thanks.
A
What size dinner would you like? (M)edium, (L)arge or e(X)tra Large?
L
What meat would you like with that? (B)eef, (C)hicken or (P)ork?
P
Large dinners come with three sides - options are:
- (R)oast Potatoes
- (C)arrots
- (P)eas
- (Y)orkshire pudding
- (G)ravy
- (B)roccoli
G
And your next side?
Y
And your next side?
ITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 4 of 7
R
Thank you. Would you like to add a serve of (M)eat or a (S)side? (N)o
thanks.
S
Available sides are:
- (R)oast Potatoes
- (C)arrots
- (P)eas
- (Y)orkshire pudding
- (G)ravy
- (B)roccoli
B
Thank you. Would you like to add a serve of (M)eat or a (S)side? (N)o
thanks.
N
Would you like to (A)dd a dinner to your order? (N)o thanks.
N
----------------------------------------
Thanks Hungry Joe (Ph: 0123456789)
Your order summary is:
- Medium dinner with Beef, Chicken, Roast Potatoes and Carrots.
- Large dinner with Pork, Gravy, Yorkshire Pudding, Roast Potatoes and
Broccoli.
Your order comes to: $31.00
-----------------------------------------
----------- Have a nice day! ------------
-----------------------------------------
ITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 5 of 7
Suggested Development Environments
Codeblocks for C '99 / C++
Code::Blocks can be downloaded from: http://www.codeblocks.org/downloads/binaries
To create a new C project is: When you create a project, choose File | New and then Console Application, and
then choose C or C++ as the programming language.
IDLE for Python
Python, including the IDLE development environment can be downloaded from:
https://www.python.org/downloads/
Eclipse for Java
Eclipse may be freely downloaded from: http://www.eclipse.org/downloads/
Eclipse does not come with the Java JDK, which must the downloaded separately from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Ensure that your Eclipse type and Java type match – i.e. 32-bit Java for 32-bit Eclipse, or 64-bit Java for 64-bit
Eclipse. If you mix and match it won't work.
GNU CLisp for Common Lisp
CLISP 2.49 can be obtained from: http://sourceforge.net/projects/clisp/files/latest/download
Any good text editor would be suitable for writing the source code.
Stawberry Perl for Perl
Strawberyy Perl can be obtained from: http://strawberryperl.com/
Any good text editor would be suitable for writing the source code.
ITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 6 of 7
Additional Documentation – Language Suitability Report
Every programming languages is designed to be used for different types of tasks, and has features which allow
it to be a good choice for those tasks, while perhaps not as good at different types of tasks.
During your implementation of the roast dinner program in each of the languages you should make notes
about the language features which exist or do not exist, and which have therefore made program
development easier or more difficult.
Where a language has not provided a feature which would have been useful to the implementation of the
program, or where the complexity of using a language feature has been high you should remark upon it and
briefly discuss a mechanism or feature of another language which would have made development easier.
After completing the application in all languages (or as many as you can), discuss the comparative ease of
implementation in terms of the design, implementation and debugging for each programming language,
including how robustness issues were addressed.
Submission and Marking Process
You must supply your program source code files and language suitability report documentation in as single
compressed archive called:
ITECH5403_Assignment_2__.zip
You may supply your programming language suitability report in either Word or LibreOffice/OpenOffice
format in which the document can be edited – no proprietary Mac specific formats, please.
Assignments will be marked on the basis of fulfilment of the requirements and the quality of the work. In
addition to the marking criteria, marks may be deducted for failure to comply with the assignment
requirements, including (but not limited to):
Incomplete implementation(s), and
Incomplete submissions (e.g. missing files), and
Poor spelling and grammar.
Submit your assignment (all program source files plus your discussion document) to the Assignment 2 Upload
location on Moodle before the deadline of Friday of week 11 at 5pm.
The mark distribution for this assignment is explained on the next page.
ITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 7 of 7
Assignment 2 – Parallel Implementations
Student name: Student ID:
Requirement Weight Mark
Implementation of the roast dinner shop program in the C or C++ programming language.
Areas of note include:
- Use of data structures,
- Robust input handling which does not cause program termination if provided with bad
data (i.e. program expects a number, gets given alphanumerical data).
10
Implementation of the roast dinner shop program in the Python programming language. Areas
of note include:
- Python Standard library,
- List mechanisms.
10
Implementation of the roast dinner shop program in the Java programming language. Areas of
note include:
- Object orientation mechanism / method calls,
- Error handling
- Standard Java libraries
10
Implementation of the roast dinner shop program in the Lisp or Perl programming languages.
Areas of note include:
- Possible use of recursion
- lists
- Inbuilt data structures
10
Documentation and discussion of the comparative ease of implementation (design /
implement / debug) in each programming language, including how robustness issues were
addressed.
10
Spelling and grammar 5
Assignment mark total / 55
Contribution to unit mark (out of 20%) %
Comments: