0% found this document useful (0 votes)
506 views4 pages

Final Test (Online Version) Course: Object Oriented Programming

This document provides guidelines and requirements for a final online test in an Object Oriented Programming course. It outlines: 1) How to submit the test, which includes source code files and a Word report in a compressed folder. Submissions are due by July 25th and copying will result in a zero score. 2) The test has two parts - a general knowledge section worth 4 points and an OOP concepts section worth 6 points. 3) Part 1 includes questions on Java fundamentals and classes/objects. Part 2 requires designing classes for a book store management system based on given requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
506 views4 pages

Final Test (Online Version) Course: Object Oriented Programming

This document provides guidelines and requirements for a final online test in an Object Oriented Programming course. It outlines: 1) How to submit the test, which includes source code files and a Word report in a compressed folder. Submissions are due by July 25th and copying will result in a zero score. 2) The test has two parts - a general knowledge section worth 4 points and an OOP concepts section worth 6 points. 3) Part 1 includes questions on Java fundamentals and classes/objects. Part 2 requires designing classes for a book store management system based on given requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Ton Duc Thang University

Faculty of Information Technology

FINAL TEST (ONLINE VERSION)


COURSE: OBJECT ORIENTED PROGRAMMING
2nd SEMESTER - ACADEMIC YEAR: 2020-2021

I. Description and submission


- The test comprises of two parts:
o Part 1 (4 points): is the basic general knowledge part.
o Part 2 (6 points): is the part containing open questions.
- What to submit: Code files and a report written in Word.
- How to submit: Create a folder named FullName_StudentID, inside that create
folders Part1 and Part2 also 02 report files under the format .docx và .pdf.
Folders Part1 and Part2 contain the .java file of each part. Compress the root
folder in .zip format and submit it to the place that your lecturer specified
(Google Classroom for theory lecturer).
- The report attached is written in Word, students need to re-format it to suit your
submission. For students to be familiar with the report format, in this course
students just need to edit the attached report template.
- Submission end date: till the end of 25/07/2021.
- ABSOLUTELY NO COPYING OTHERS. If found, all related submissions
will receive 0 in point and discipline openly.
II. Guideline
- Student implements part 1, after finishing, copy code from those files to your
report for each category.
- Students write a specification in part 2, draw a class diagram and export them to
picture format for ease of moving it to the report. Implement your solution and
copy it to the report. After finishing the report, remember to delete all the
instruction comments in Word and export it in .pdf format for submission.
- Remember when copying code to the report, prettily format it for lecturers to be
able to read it correctly (have lines indentation).
- With part 2, there exists a requirement that students need to design the solution
in a unique way to differentiate between students, if found copying, related
submissions will not be accepted.
1
Ton Duc Thang University
Faculty of Information Technology

- Subject of the report: Book store management.


- After submission, students need to prepare a slide that summarizes the
report for the question and answering session, the Question and answering
session will occupy 50% of the total point.

- The time of the Question and answering session will be notified to you by
your theory lecturer.

III. Requirements
PART 1: GENERAL (4 points)
Question 1: Java (1 point)
a. Describe the rule of variable naming in Java and make some variable naming
examples.
b. Describe 03 of all the primitive types in Java.
c. Solve these requirements:
● Define a Calculator class.
● Define method public static boolean checkPrime(int n) to check if n is
prime or not. If yes, return true, else return false.
● Define method public static int calSumPrime(int n) to calculate the
sum of all prime numbers that are less than n.
● Define a main method to verify those methods.
Question 2: Class and object (1 point)
a. Define class Student with these requirements:
● Contain at least 03 properties (These properties must logically be
suitable for a student) with private access modifier.
● Contain at least 02 constructor.
● Contain getters/setters.
b. Define class Test and a main method to constructor objects of Student. Output
to the screen the properties of Student class with the help of getters.
Question & answering (2 points): The Question & answering content includes
knowledge about Java, class, object and student solution.

PART 2: OOP concepts (6 points)


Part 2 comprises 5 questions and 1 question & answering session, there will be
questions that students need to design and define in your term that matches the
requirement.

2
Ton Duc Thang University
Faculty of Information Technology

- Question 1 (0.5 points): Read the requirement and write a specification (Explain
properties, methods, inheritance, overload, override, … which are included in
your solution).
- Question 2 (0.5 points): Draw class diagram.
- Question 3 (1.0 point): Solution implementation for classes in the requirement.
- Question 4 (0.5 points): Write a book management class to manage an existing
book.
- Question 5 (0.5 points): Write a main method to test your solution. (Points will
be counted if the student implemented the correct class according to the
requirement).
- Question & answering session (3 points): Students will answer lecturer
questions about theory and your solution related to these 5 questions.
With part 2, students need to design properties and methods that are in accordance
with business requirements logically. Classes, properties, methods naming are not
specified in a strict way, the naming is of your choice but need to meet business
requirements properly.
For solution implementation (code) needs to be copied to the report.
Question 1 (0.5 points): Students write a specification about the subject Book store
management. One Book class and two classes that inherited from Book are Literary
Book and Magazine. Student self-implement properties, methods, 1 of those properties
need to be the book original cost, at least 02 random properties (suitable with a
book object), 02 random constructors, 01 abstraction method for selling price
calculation and another 02 process methods (Constructor, getter/setter, toString,
equals are not counted as process method).
For the literary book there must be at least 02 properties: Author and Publishing
year, another 02 constructors, 01 method for selling price calculation and 02
process methods. For the selling price calculation method, the formula is the original
cost + 5% tax.
For the magazine there must be at least 02 properties: Date of publishing and
Publisher, another 02 constructors, 01 method for selling price calculation and 02
process methods. For the selling price calculation method, the formula is the original
cost + 10% tax.

3
Ton Duc Thang University
Faculty of Information Technology

(Suggestions: Student designs properties in a way that we can incorporate process


methods such as book discount, counting of books in storage, …)
In the specification, students need to explain: the properties, the methods, the place
that you apply overload, override, inheritance, polymorphism, abstraction, …
Question 2 (0.5 points): Design class diagram UML according to the requirement
consists of properties and methods (Suggestions: Could use the website draw.io)
Question 3 (1.0 point): Solution implementation (code) for the requirement in part 2.
Question 4 (0.5 points): Implementation(code) of a class to manage books which
contains a property is a list of books (ArrayList of Vector), 01 constructor with a list
of books as its argument. Student need to implement one of these two methods:
● A method that returns the book object with the highest selling price.
● A method that returns the sum of magazine selling price.
● A method that returns a list of literary books published in n, n is the parameter
to this method.
Câu 5 (0.5 points): Implement a class with a main method to test your solution (code):
● Construct a literary book object and a magazine object, call all methods for
each object.
● Construct a book management object, pass into it a list of 6 books (03 literary
books, 03 magazines), call the method that you chose in question 4.
Question & answering session (3 points): Student will answer lecturer questions
about theory, your solution related to these 5 questions in Question & answering
session.

---THE END---

You might also like