Recent Question/Assignment
BIT246: Object Oriented RAD
Assessment 2 – Software Application – Ruby Project – Phase 2
Due Date: Week 8
Hurdle task: Week 8
Total Assessment 2 Weightage: 35%
Total Possible Marks: 15 marks
Phase2 – 15 marks out of 35 marks – 15% of 100 marks
A company often needs to retrieve documents on its hard drive based on those documents containing words or phrases. It thus needs a system that allows the user to enter the required phrase or word and to then find the document/s containing that phrase and to print them to screen.
The type of documents that need to be accessed are
1. Text
2. Word (.doc or .docx)
3. Pdf
To shorten the search path, the user would also enter the root directory where the search begins. An example of the Ruby implementation – User interface is shown below:
This Assessment contains HURDLE TASK – Question Answer session about your submission– the hurdle task that must be passed to pass this phase of the assessment.
The project is to be delivered in several phases. Following are the specifications of Assessment 2 – Phase 2.
The Assessment 2 – Phase 2 consists of 2 questions.
Phase 2 (15 marks – due week 8)
1. Question 1 – Search in text(.txt) files
(5 marks)
Create a Ruby program file named Phase2Q11234.rb (1234 should replace by your student ID) and add the program logic needed to perform the following tasks:
1. Request two user inputs in text form- a term (or a word or a phrase) and a folder path(or directory path) from the user through command prompt. For example, a user inputs word “Ruby” and “C: DocumentsMPS2 2020BIT246 OOP RAD Ruby” folder to find Ruby word in all text files in this folder.
2. Search for user input term in all text documents (.txt) in the user given directory and sub-directories
(user input directory). Use glob method – Write in comments in program why to use glob
3. Search the user input term with case-insensitive i.e. For user input = Ruby will return the list of file that contains the word with any combination of uppercase or lowercase character e.g. Ruby, ruby, rubY or rUby.
4. Output the list of names of the text files containing the user given term and portion of content of each text file. You can add information like total number of documents containing the user given word or total number of occurrences of the user given word in a specific text file.
5. Display the appropriate message/information, if there is no match found for the given term/word/phrase in all text documents in the given directory.
6. This phase does not require any fancy user interface. User input will be provided through command prompt.
7. Develop program in Ruby to implement above functionality by using classes, attributes, methods, objects, and constructor. (Sample class is given on Moodle – Phase 2 Plan.doc)
8. Add appropriate comments e.g. Name, Student ID, functionality of a variable, brief explanation of logic
2. Question 2 – Search in text(.txt), MS Word (.doc and .docx) and PDF files (10 marks)
Create a Ruby program file named Phase2Q21234.rb (1234 should replace by your student ID) and add the program logic needed to perform the following tasks:
1. This phase extends Question 1 by adding the capacity to search user given term(or word or phrase) in Word and Pdf documents as well as text documents.
2. Ruby gems are required to implement Phase 2 (i.e. download from https://rubygems.org/, installing the gem, using ‘require’ in code and calling the appropriate method of the gem ).
Hint: Read the related gem documentation to identify the parameters and output of different methods provided by the gem.
3. Use search_in_file gem. (https://rubygems.org/gems/search_in_file/versions/1.0.1). Install all development dependencies.
4. Add appropriate comments e.g. Name, Student ID, functionality of each variable, brief explanation of your program logic.
5. Please note, no or less marks will be awarded if program does not execute or does not display correct output.
Plagiarism
All used sources must be properly acknowledged with references and citations, if you did not create it. Quotations and paraphrasing are allowed but the sources must be acknowledged. Failure to do so is regarded as plagiarism and the minimum penalty for plagiarism is failure for the assignment. The act of given your assignment to another student is classified as a plagiarism offence. Copying large chucks and supplying a reference will result in zero marks as you have not contributed to the report. Copying from Youtube or other videos is also plagiarism (including transcripts). Citation in a video can be included as credits at the end.
Late Submission
Late submission of assignments will be penalised as follows:
• For assignments 1 to 10 days late, a penalty of 5% (of total available marks) per day.
• For assignments more than 10 days late, a penalty of 100% will apply. Which means, the assignment will not be marked and attract a fail grade.
Your submission must be compatible with the software (PDF/Word/Video/Zip) in Melbourne Polytechnic, Computer Laboratories/Classrooms.
Extensions:
Under normal circumstances, extensions will not be granted. In case of extenuating circumstances—such as illness—a Special Consideration form, accompanied by supporting documentation, must be received before 3 working days from the due date. If granted, an extension will be only granted only by the time period stated on the documentation; that is, if the illness medical certificate was for one day, an extension will be granted for one day only. Accordingly, the student must submit within that time limit.
Penalties may apply for late submission without an approved extension.
Penalties:
Academic misconduct such as cheating and plagiarism incur penalties ranging from a zero result to program exclusion.
All assessments (except for final examination) and feedback are provided via the Moodle site and in classes.
Assessment Tasks: Due Date SLOs CLOs Weight Comments
Class Test – Two written assessments of key concepts of object oriented programming and design, including syntax and semantics of the programming language. (30 minutes) Week 4 and Week 10 1,2,3,4 1 20% Individual
Software Application – Suggested topic: Development and demonstration of an original advanced application system based on. Suggested topic
Phase 2 (15%): Working with Files and
folders by using Ruby gems
Phase 1 (5%) : Working with Files and Folders
Phase 3 (15%): Working with Files and folders by using rails Phase 1 – Week 6 Phase 2 – Week 8 and
Phase 3 – Week 12 1,2,3 1,3 35% Individual
Report and Oral Presentation - Suggested topic: A report and presentation to demonstrate an understanding of Ruby programming concept. Week 11 4 3 20% Individual
Software Application – Suggested topic: Development and demonstration of a web-based application using MVC for multiple CRUDs for multiple models Week 14 1,2,3 1,3 25% Individual
Rubric for Assessment 2 – Phase 2
Following test cases will be executed to mark the assessment:
1. User given folder path does not exists
2. User given folder path exists, but the given phrase or word does exist in any of the files
3. User given folder path exists and files found contains the given phrase or word.
4. For Question 2 - Search in text, doc, docx and pdf files
This Assessment contains HURDLE TASK – Question Answer session about your submission– the hurdle task that must be passed to pass this phase of the assessment.
Marking Week Possible marks
No Comments -1
No Classes, methods, and constructor -2
Question 1 (5 marks)
Total Marks 5
Takes user input 0.5
Implement case-insensitive search 0.5
Verify that the folder, file exists 0.5
Correct conditional loop statements 1
Glob method is used or recursive search 0.5
Appropriate message and output 0.5
All test cases work 1
Question 2 (10 marks)
Total Marks 5
Program is not executable or syntax errors -5
Takes user input 0.5
Use of Classes, methods, and constructor 0.5
Use of Search_in_file gem 4
Correct conditional loop statements 1
Change gem to implement case-insensitive search 2
Appropriate message and output 1
All use cases works 1