OOP-1 Assignment
OOP-1 Assignment
Assignment
1. Overview
The purpose of this assignment is to gain practice in the main concepts of object-
oriented (inheritance, encapsulation, polymorphism, abstraction). It also aims to
create, write, and read files and get the file name.
2. The Required Format
The followings are the required format for the “ASSIGNMENT” document.
• User a readable font (e.g., Times New Roman, Cambria, and Arial).
• All pages should be numbered, including the cover page.
• Evaluation Criteria should be included at the end of the document.
• Use the template provided on the blackboard.
3. Description
Task1:
In your words, write a descriptive essay that describes the main concepts of object-
oriented programming (inheritance, encapsulation, polymorphism, and
abstraction), including each concept's definition and advantages and disadvantages.
Then, how they are implemented; explain your answer by creating a program as an
example for each concept; a screenshot of the source code and the program's output is
required.
Task 2:
Write a java program that allows the user to create a file, write to a file, read from a file
and get the name of the created file.
- The user should be asked again and again to choose from the above options unless
the user selects 4. If the user entered 4, Goodbye! Message will be printed out to the
user, and then the program will be stopped.
- The Exception handling should be implemented to handle any exceptions that might
be thrown (e.g., io.IOException: No such file or directory). This type of exception
is thrown if the user enters an absolute path that does not exist. So, as a
programmer, write your code to handle any type of exceptions that might be
occurred, and print out the following message (Invalid Input) to the user in red
colour.
4. SUBMITION GUILDLINES
1. The assignment should be submitted in Blackboard on Saturday (25/05/2024)
(7:00 PM).
2. Late submission is strictly not accepted and will result in “0 mark”.
3. The assignment should be submitted as a word file; it must be named OOP1_
Asgmt#std.docx.
4. Any student who is involved in any sort of copying will be given zero.