ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 1 of 10 ITECH5403 - Assignment 2 – Parallel Implementations Due Date: 5pm, Friday of Week 11 (Sem 1807) This assignment will test your skills in identifying comparative features of different programming languages through implementing a programming application. This task worth 20% marks of this course and belongs to the non-invigilated (type A) assessment task. Assignment Overview You are tasked with creating a text-based program for library admins to store data on a Library System. However, as this is a comparative languages course, you will be creating the same application in the following three programming languages: • Java, • Python, 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, and - Any issues or complications which arose due to the complexity or lack of any language features. A brief discussion document 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 version of the application you write is in the programming language which is most familiar to you. This will help you to have a working 'template' which you can then translate into the other programming languages. Program Specification When the program first launches, there is a menu which allows the users (library admins) to select one of the following options: 1) Add new member 2) Add new book 3) Process borrowing 4) Process returning 5) View member status 6) View book status 7) Quit ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 2 of 10 The functionalities of these options are as follows: 1) When users add a new member they provide a member-name which are stored in some manner of array or list. Members are assigned a unique ID value where the first member added is assigned the ID value 1, the second member added is assigned the ID value 2 and so on. 2) When users add a new book they provide a book-title, and the number of copies of that book. These information are stored in some manner of array or list. Books are also automatically assigned a unique ID values such as 1, 2, 3 etc. Additionally, information needs to be kept regarding books whether they are available or not. 3) When users process a borrowing they provide a member-ID, and book-ID. The IDs must be registered on the system. That is, to successfully create a book borrowing: • The member ID must be of an existing member in the system • The book ID must be of a book that exists in the system, and • The book must be available to be borrowed After processing a borrowing, the information regarding the number of books should be updated. If no more copy of that book is available then the book is not available for borrowing. 4) When users process a returning, they provide a member-ID, and book-ID. The book should be taken off from that member’s record, and the number of available book information should be updated. 5) If the users opt to view member status then they are prompted to enter the member ID - and then any books borrowed by that member are displayed including: - The member’s name, and the title of books they are currently keeping. 6) If the users opt to view book status then they are prompted to enter a book ID - and then the following information are displayed: - number of available copy of the book, if it is zero then a message that the book is not available and - the list of members’ name who borrowed it. 7) When a user chooses to Quit, the program terminates with a goodbye message. Where required, your program should check for valid data entry and loop until valid data is entered. Each implementation of your project (in each of the three languages you choose) should aim to closely match the setup and structure of the program as shown in the example output on the following pages. Add codes to pre-create a few members, books and borrowings on each run of your code to avoid the need to type in those details over and over when testing your program. However your program should not depend only on those hard-coded items. Instead it should be capable of taking new items as inputs and give proper outputs according to those new inputs. These will be checked by the assessor at the time of marking your assignment. ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 3 of 10 Example Program Output Startup and add new member example output ----------------------------------------------- ----- Welcome to ITECH5403 Library System ----- ----------------------------------------------- Main Menu - please select an option: 1) Add new member 2) Add new book 3) Process borrowing 4) Process returning 5) View member status 6) View book status 7) Quit 1 Adding a new member: Please enter a new member name: Amina Member [Amina] has been created with member ID: [1] Would you like to [a]dd a new member or go-[b]ack to the previous menu? a Please enter a new member name: John Member [John] has been created with member ID: [2] Would you like to [a]dd a new member or go-[b]ack to the previous menu? a Please enter a new member name: Alex Member [Alex] has been created with member ID: [3] Would you like to [a]dd a new member or go-[b]ack to the previous menu? b Add new book example output Main Menu - please select an option: 1) Add new member 2) Add new book 3) Process borrowing 4) Process returning 5) View member status 6) View book status 7) Quit 2 Adding new book: Please enter a new book title: ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 4 of 10 Romeo et Juliette Book already exists: Book ID: 1 Book Title: Romeo et Juliette Number of copies: 1 Please enter a new book title: Sense and sensibility Please enter number of copies: 3 New book added: Book ID: 2 Book Title: Sense and sensibility Number of copies: 3 Would you like to [a]dd a new book or go-[b]ack to the previous menu? a Please enter a new book title: Prometheus Please enter number of copies: 2 New book added: Book ID: 3 Book Title: Prometheus Number of copies: 2 Would you like to [a]dd a new book or go-[b]ack to the previous menu? b Process borrowing example output Main Menu - please select an option: 1) Add new member 2) Add new book 3) Process borrowing 4) Process returning 5) View member status 6) View book status 7) Quit 3 Please enter a valid member ID: 99 Member does not exist. Please enter a valid member ID: 1 Please enter a valid book ID for borrowing by member [Amina]: 66 Book does not exist. Please enter a valid book ID for borrowing by member [Amina]: 3 *** Borrowing processed successfully*** Member: Amina Borrowed Book title: Prometheus Number of books remaining: 1 ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 5 of 10 Would you like to [p]rocess a new borrowing or go-[b]ack to the previous menu? p Please enter a valid member ID: 2 Please enter a valid book ID for borrowing by member [John]: 3 *** Borrowing processed successfully*** Member: John Borrowed Book title: Prometheus Number of books remaining: 0 Would you like to [p]rocess a new borrowing or go-[b]ack to the previous menu? p Please enter a valid member ID: 3 Please enter a valid book ID for borrowing by member [Alex]: 3 Sorry!!! Book titled [Prometheus] currently is not available for borrowing. Would you like to [p]rocess a new borrowing or go-[b]ack to the previous menu? p Please enter a valid member ID: 3 Please enter a valid book ID for borrowing by member [Alex]: ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 6 of 10 4 Please enter a valid member ID: 999 Member does not exist. Please enter a valid member ID: 1 Please enter a valid book ID returned by [Amina]: 66 Book does not exist. Please enter a valid book ID returned by [Amina]: 3 *** Returning processed successfully*** Member: Amina Book returned: Prometheus After returning Number of books [Prometheus] available in stock: 1 Would you like to [p]rocess a new returning or go-[b]ack to the previous menu? p Please enter a valid member ID: 3 Please enter a valid book ID returned by [John]: 2 *** Returning processed successfully*** Member: John Book returned: Prometheus After returning Number of books [Prometheus] available in stock: 2 Would you like to [p]rocess a new returning or go-[b]ack to the previous menu? b View member status example output Main Menu - please select an option: 1) Add new member 2) Add new book 3) Process borrowing 4) Process returning 5) View member status 6) View book status 7) Quit 5 Please enter a valid member ID: 99 Member does not exist. Please enter a valid member ID: 2 Member [2] : John Borrowed Books: None Would you like to view a new member’s [s]tatus or go-[b]ack to the previous menu? s ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 7 of 10 Please enter a valid member ID: 3 Member [3] : Alex Borrowed Books: Sense and Sensibility, Romeo et Juliette Would you like to view a new member’s [s]tatus or go-[b]ack to the previous menu? b View book status example output Main Menu - please select an option: 1) Add new member 2) Add new book 3) Process borrowing 4) Process returning 5) View member status 6) View book status 7) Quit 6 Please enter a valid book ID: 99 Book does not exist. Please enter a valid book ID: 3 Book [3]: Prometheus Available number of copies: 2 List of Members borrowing: None Would you like to view a new book [s]tatus or go-[b]ack to the previous menu? s Please enter a valid book ID: 2 Book [2] : Sense and Sensibility Available number of copies: 2 List of Members borrowing: Alex Would you like to view a new book [s]tatus or go-[b]ack to the previous menu? b Quit example output Main Menu - please select an option: 1) Add new member 2) Add new book 3) Process borrowing 4) Process returning 5) View member status ITECH5403 – Comparative Programming Languages School of Science, Engineering and Information Technology CRICOS Provider No. 00103D Page 8 of 10 6) View book status 7) Quit 7 Thanks for using ITECH5403 Library System! Suggested Development Environments 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. PyCharm or IDLE for Python Python, including the IDLE development environment can be downloaded freely from: https://www.python.org/downloads/ PyCharm Community Edition can be downloaded freely from: https://www.jetbrains.com/pycharm/ 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 9 of 10 Additional Documentation – Language Suitability Report Every programming language 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 program in each of the languages chosen 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 PDF format. 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 10 of 10 Assignment 2 – Parallel Implementations Student ID: Student Name: Requirement Weight Mark Implementation 1: Java - Functionality - Adherence to the specification - Robustness / input handling 10 Implementation 2: Python - Functionality - Adherence to the specification - Robustness / input handling 10 Implementation 3: Perl or Lisp - Functionality - Adherence to the specification - Robustness / input handling 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 45 Contribution to unit mark (out of 20%) 20 Comments: