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 Fruit and Veg Basket 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 features 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 Fruit and Veg Baskets, where a basket may be either: medium, large or extra
large.
Medium baskets cost $10, large baskets cost $15 and extra large baskets cost $25.
Medium baskets come with two serve of fruit and one serve of vegetables.
Large baskets come with two serves of fruit and two serves of vegetables.
Extra large baskets come with three serves of fruit and three serves of vegetables.
Figure 1 - A Fruit and Vegetable basket.ITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 2 of 7
Customers may choose from the following fruits (technically, a banana is a herb – but we'll call it a fruit!):
- Apples,
- Bananas,
- Cherries, and
- Dates.
Customers may choose from the following vegetables:
- Artichokes,
- Broccoli,
- Carrots, and
- Potatoes.
A basket order consists of an order for one or more fruit and veg baskets, where each basket has a size and a list of fruit
and vegetables that it's comprised of.
Each basket order requires a name and a phone number for pickup. Delivery is not available.
Customers may choose to add additional serves of fruit or vegetables to any ordered basket at $6 per serve.
The application must be error tolerant and capable of accepting keyboard input to store a number of basket 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 that have been taken during this run of the program, including:
The name and phone number of the person who is making the order.
The total cost of the order, and
The details of each basket ordered (size and fruit/veg details).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 Fruit and Veg Baskets ---
-----------------------------------------------
[T]ake next order, [D]isplay all placed orders or [Q]uit?
T
Could I take your name please?
Hungry Joe
And your phone number?
0123456789
What size basket would you like? (M)edium, (L)arge or e(X)tra Large?
M
Medium baskets come with two serves of fruit, you may choose from:
- (A)pples
- (B)ananas
- (C)herries
- (D)ates
What is your first fruit?
A
What is your second fruit?
B
Medium baskets come with one serve of vegetables, you may choose from:
- (A)rtichokes
- (B)roccoli
- (C)arrots
- (P)otatoes
What is your first vegetable?
C
Thank you. Would you like to add an additional serve of (F)ruit or (V)eg?
(N)o thanks.
F
What fruit would you like to add:
- (A)pples
- (B)ananas
- (C)herries
- (D)ates
C
Thank you. Would you like to add an additional serve of (F)ruit or (V)eg?
(N)o thanks.
N
Would you like to (A)dd another basket to your order? (N)o thanks.
A
What size basket would you like? (M)edium, (L)arge or e(X)tra Large?
L
Medium baskets come with two serves of fruit, you may choose from:
- (A)pples
- (B)ananas
- (C)herriesITECH5403 – Comparative Programming Languages
School of Science, Engineering and Information Technology
CRICOS Provider No. 00103D Page 4 of 7
- (D)ates
What is your first fruit?
C
What is your second fruit?
D
Medium baskets come with two serves of vegetables, you may choose from:
- (A)rtichokes
- (B)roccoli
- (C)arrots
- (P)otatoes
What is your first vegetable?
A
What is your second vegetable?
B
Thank you. Would you like to add an additional serve of (F)ruit or (V)eg?
(N)o thanks.
N
Would you like to (A)dd another basket to your order? (N)o thanks.
N
----------------------------------------
Thanks Hungry Joe (Ph: 0123456789)
Your order summary is:
- $16.00 - Medium basket with Apples, Bananas, Cherries and Carrots.
- $15.00 - Large basket Cherries, Dates, Artichokes and Broccoli.
Your order comes to: $31.00
-----------------------------------------
----------- Have a nice day! ------------
-----------------------------------------
-----------------------------------------------
--- Welcome to FedUni Fruit and Veg Baskets ---
-----------------------------------------------
[T]ake next order, [D]isplay all placed orders or [Q]uit?
T
Could I take your name please?
... and so on!
[T] takes the next order.
[D] displays a summary of all orders including a
total cost for all orders taken during this run.
[Q] quits the program.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
Strawberry 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 fruit and veg basket 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 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 program in the Python programming language. Areas of note include:
- Python Standard library,
- List mechanisms. 10
Implementation of the program in the Java programming language. Areas of note include:
- Object orientation mechanism / method calls,
- Error handling
- Standard Java libraries
10
Implementation of the 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: