This End-of-Course Assessment paper contains THREE (3) questions and comprisesFIFTEEN (15) pages (including the cover page).
End-of-Course Assessment
Object Oriented Programming
INSTRUCTIONS TO STUDENTS:
Please follow the submission instructions stated below:
This ECA carries 70% of the course marks and is a compulsory component. It is to be done individually and not collaboratively with other students.
You are to submit the ECA assignment in exactly the same manner as your tutor-marked assignments (TMA), i.e. using Canvas. Submission in any other manner like hardcopy or any other means will not be accepted.
Electronic transmission is not immediate. It is possible that the network traffic may be particularly heavy on the cut-off date and connections to the system cannot be guaranteed. Hence, you are advised to submit your assignment the day before the cut-off date in order to make sure that the submission is accepted and in good time.
Once you have submitted your ECA assignment, the status is displayed on the computer screen. You will only receive a successful assignment submission message if you had applied for the e-mail notification option.
Please note the following:
a)Submission Cut-off Time – The cut-off time for ECA submission will be at 2355 hrs on the day of the deadline. All submission timings will be based on the time recorded by
b)Start Time for Deduction – Students are given a grace period of 12hours. Hence calculation of late submissions of ECAs will begin at 12:00 noon the following day (this applies even if it is a holiday or weekend) after the
c)How the Scheme Works – From 12:00 noon the following day after the deadline, 10 marks will be deductedfor each 24-hour Submissions that are subject to more than 50 marks deduction will be assigned zero mark. For examples on how the scheme works, please refer to Section 5.2 Para 1.7.3 of the Student Handbook.
Any extra files, missing appendices or corrections received after the cut-off date will also not be considered in the grading of your ECA assignment.
Plagiarism and collusion are forms of cheating and are not acceptable in any form of a student’s work, including this ECA assignment. You can avoid plagiarism by giving appropriate references when you use some other people’s ideas, words or pictures (including diagrams). Refer to the American Psychological Association (APA) Manual if you need reminding about quoting and referencing. You can avoid collusion by ensuring that your submission is based on your own individual effort.
The electronic submission of your ECA assignment will be screened through a plagiarism detecting software. For more information about plagiarism and cheating, you should refer to the Student Handbook. SUSS takes a tough stance against plagiarism and collusion. Serious cases will normally result in the student being referred to SUSS’s Student Disciplinary Group. For other cases, significant marking penalties or expulsion from the course will be imposed.
Submit your solution document in the form of a single MS Word file. You are to include the following particulars in your submission: Course Code, Title of the ECA, SUSS PI No., Your Name, and Submission Date. Put this information in the first page of your solution document. Use the template word document provided – SUSS_PI-No_FullName_ECA.docx. Rename the file with your suss PI and full name join with “_ECA” e.g. “SUSS_PI- TomTanKinMeng_ECA.docx” (without the quotes). Do NOT submit as a pdf document.
You should make only one submission for ECA.
You are to copy and paste the source codes of each program you write into your solution document, provided in the template word document. If you submit the source codes as a screenshot, you will be penalized. Submit screenshots for only the output of your program, where applicable.
Answer all questions. (Total 100 marks)
A library wishes to allow members to search for library items based on title, keywords and authors, and to make enquiry on fines for items should they be returned late.
Write the following classes that construct the necessary class hierarchy and associations for the library application:
This class is an abstract superclass.
lossSurchargeRate.
getLateCharges method has one parameter: number of days.
lossSurchargeRate method does not have parameter.
The Book class is a subclass of the Item class.
The Library class has a collection of items such as books.
Write a constructor for the class. The constructor does not have any parameter.
Item 1:
ISBN: 9781234567890 Title: Python For Beginners Price: $29.99 Authors: Tom Smart, Alice Alanis
Year Published: 2019 Edition: 2
Item 2:
ISBN: 9781234567891 Title: Fun With Python Price: $10.00 Author: Tom Smart
Year Published: 2018 Edition: 1
The method itemsByAuthor has a parameter: an author. It locates the items that are written by the author, and returns a string representation of these items. The method itemsWithTitle has a parameter: a title. It locates items with the title, and returns a string representation of these items.
The method itemsWithKeywords has a parameter: a list of keywords. It locates items whose title contains all the keywords, and returns a string representation of these items.
The method listItems does not have any parameter. It returns a string representation of all the items in the library.
The methods itemsByAuthor, itemsWithTitle, itemsWithKeywords
and listItems must call the method showResult.
(9 marks)
#create a Library object
#create 2 Book objects with these details add them to the library
# First Book ISBN: 9781234567890 Title: Python For Beginners Price: $29.99
# Second Book ISBN: 9781234567891 Title: Fun With Python Price: $10.00 # Author: Tom Smart Year Published: 2018 Edition: 1
#display the list of items
#search and display items with title Fun with python #search and display items with author Tom Smart #search and display items with keywords fun and python #search and display items with keyword python
# remove the item with isbn 9781234567890
# display the late charges when the book with isbn 9781234567891 is returned # 1, 8, 19 and 100 days late
(4 marks)
(e)Useexamples from your solutions to parts a) to d) to explain and illustrate how to apply the concepts of THREE (3) SOLID
(9 marks)
NOTE TO STUDENTS: Copy and paste the Python code for classes Item, Book and Library and the function main IN THIS ORDER. Write your answer to Q1(e) in the word document. Copy and paste the screenshot showing the output from running the function main.