Assignment-4: Submission Deadline: Sunday, April 4, 2021 (End-Of-Day, 11:59pm)
Assignment-4: Submission Deadline: Sunday, April 4, 2021 (End-Of-Day, 11:59pm)
Assignment-4
Submission deadline: Sunday, April 4th, 2021 (end-of-day, 11:59pm)
1- When submitting your work, you must use Blackboard, NO other means like email submissions,
etc., are accepted.
2- Assignments are to be solved individually. It is expected that you may discuss the problems with
your classmates, however, you should NOT discuss the solutions NOR write-up solutions
together NOR copy-and-paste solutions that are not YOURS.
3- Submit your work as instructed below before the deadline.
If you have any uncertainty, questions or doubts about any of the above, ask the instructor or the TA!
Submission Instructions:
• In your computer, create a folder called Spring2021_Assignment_4 in which all your work
should be saved. You should submit an archive of this folder when you finish as follows.
1. In the Spring2021_ Assignment _4 folder, create an MS-Word document called
mySolutions and add your name and QUID on the top line and save the file. You will
write your answers to theoretical questions in this Word document. You will also add
copies of your source files and output screens to this Word document.
2. For programming questions, create Java projects named ????-Q##, where ???? is your
“QU Username”, and ## is the corresponding question number from the assignment
(Q1 for question 1, Q2 for question 2, and so on).
3. Add your name and QUID as comments on the top of each source file.
4. When you finish, save all open files, close Eclipse, close MS-Word, and then archive
your Spring2021_ Assignment _4 folder as a .rar or .zip file and upload it on Blackboard.
5. Note that when asked to design an algorithm, the efficiency of your algorithm is very
important. The more efficient is your algorithm the better is your grade. Inefficient
algorithms may lead to poor grades when a much better algorithm exist.
6. Note that the readability of your code is very important. Using meaningful identifier
names for your variables and maintaining correct source code formatting is graded as
part of your solution.
Solve the following from the end-of-chapter exercises of Chapter 4 the textbook.
Note: in any of the questions, if you are asked to write an algorithm, then you need write the
pseudocode AND to implement it in Java.
Q5. [15 pts] End-of-Chapter 4, Exercise 20: Implement the algorithm in Section 4.3.1 on your
system and run it on the instance in Exercise 19.