CSC3002 Assignment 3 solution

$24.99

Original Work ?

Download Details:

  • Name: Assignment3.zip
  • Type: zip
  • Size: 7.95 MB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (3 votes)

Assignment description:
You are supposed to complete the .cpp and .h files provided as
requirement shown in the problems. Please pack your whole project
files into a single .zip file, name it using your student ID (e.g. if your
student ID is 123456, then the file should be named as 123456.zip), and
then submit the .zip file via Blackboard System.
You should use the simple project containing C++ Standford Library and
start your programing.
Please note that, the teaching assistant may ask you to explain the
meaning of your program, to ensure that the codes are indeed written
by yourself. Please also note that we may check whether your program
is too similar to your fellow students’ code using Moodle.
Please refer to the BB system for the assignment deadline. For each day
of late submission, you will obtain late penalty in the assignment marks.
If you submit more than three days later than the deadline, you will
receive zero in this assignment.
Detailed description on assignment requirement is stated in the last
few pages.
Question 1 and Question 2:
Q1:
Q2:
Question 3:
1.
2.
Question 4
Question Requirement
Q1:
Fill the file Q1_pqueue_list.h.
You should use linked-list based implementation and
includes all the methods in the implementations of
list-based queue of the textbook.
So that when the we run the test file (do not change
the codes in this file) TestPoriorityQueue.cpp in which
Q1_pqueue_list.h is included we can have the printed
result like:
Q2:
Fill the file Q2_pqueue_heap.h.
You should use heap based implementation and
includes all the methods shown in the implementation
of list-based queue in the textbook.
So that when the we run the test file (do not change
the codes in this file) TestPoriorityQueue.cpp in which
Q2_pqueue_heap.h is included we can have the printed
result like:
Q3:
1. Reimplements the depth-first search algorithm using
an explicit stack in file “StackDFS.cpp”
2. Reimplements the breadth-first search algorithm
using an explicit queue in file “QueueBFS.cpp”
So that when we run the test file “AirlineGraph.cpp”
,
we can have the results like: (if Seattle is typed in)
Q4:
Write codes in file employee.cpp and employee.h.
Of them, employee.h and employee.cpp should include
the declaration of class Employee and its subclasses
including HourlyEmployee, CommissionedEmployee,
and SalariedEmployee, and their corresponding
implementations.
So that if we run the test file “TestEmployeeClass.cpp”,
we can have the results like:
Assignment Submission
After you test all your questions, zip the whole project
in one file named XXX.zip (XXX is your student ID and
your name is not required) and then submit it to the BB
system.
Marking scheme
For each question:
 0.6 Marks will be given to students who have
submitted the program on time.
 0.6 Marks will be given to students who wrote the
program that meet all the requirements of the
questions
 0.6 Marks will be given to students who programs
that can be compiled without errors and warnings
 0.6 Marks will be given to students whose programs
produce the correct output if their programs can be
compiled.
 0.6 Marks will be given to students who
demonstrate good programming habit and style.
Q&A
1. How to check whether the assignment is submitted
on time?
We directly check it through Blackboard system
2. How to check whether the assignment can be
compiled?
Note that we strongly suggest you to use the QT IDE
since your code tested on other IDE may not work on
QT. If you want to use other IDE, please test your
code again on QT to avoid such errors. We also
strongly suggest you to use the Standford Library if
necessary instead of STL or other similar libraries.
If the QT IDE generates any errors when building
your project, 0.4/0.6 mark will be missed for each
question. If any warnings are produced but your
code can run, 0.4/0.6 mark will be missed for all 3
questions.
3. How to check the assignment gives correct output?
We will run your code if it can be compiled (warnings
are tolerated). You test code should be correct and
output is also correct. User-friendly test code and
output is preferred.
4. How to check the programming style?
 Code layout.
Beautiful !!!!
The following points should be pay attention to:
a. The indentation used
b. {} used for function, for structure, while structure,
switch structure.
c. meaningful variable name.
We strongly suggest you to adhere to the coding style
used in our textbook, which will be followed by us to
check your code.