CSC3002: Introduction to Computer Science Assignment 3 Solved

25.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment

Description

5/5 - (2 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:

 

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 “cpp
  2. Reimplements the breadth-first search algorithm using an explicit queue in file “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:

 

  • 6 Marks will be given to students who have submitted the program on time.

 

  • 6 Marks will be given to students who wrote the program that meet all the requirements of the questions

 

  • 6 Marks will be given to students who programs that can be compiled without errors and warnings

 

  • 6 Marks will be given to students whose programs produce the correct output if their programs can be compiled.

 

  • 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

 

  1. 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.

 

  1. 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.

 

  1. How to check the programming style?

l Code layout.

 

Beautiful !!!!

 

The following points should be pay attention to: a. The indentation used

  1. {} used for function, for structure, while structure, switch structure.
  2. 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.

 

  • Assignment3-1.zip