Access Millions of academic & study documents

COS 30008 Swinburne University Data Structures & Patterns Exam

Content type
User Generated
Subject
Computer Science
School
Swinburne University Of Technology
Type
Exam Practice
Showing Page:
1/9

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/9

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/9

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 9 pages?
Access Now
Unformatted Attachment Preview
COS30008 Semester 1, 2020 Dr. Markus Lumpe Swinburne University of Technology Faculty of Science, Engineering and Technology FINAL EXAM COVER SHEET Subject Code: COS30008 Subject Title: Data Structures & Patterns Due date: June 24, 2020, 20:59 Lecturer: Dr. Markus Lumpe Your name: Check Your student id: Mon Tues Tues Tues Tues Wed Wed Wed Wed Thurs 14:30 08:30 10:30 12:30 14:30 08:30 10:30 12:30 14:30 08:30 Tutorial Marker's comments: Problem Marks 1 – TTree 104 2 - traversDepthFirst 14 3 – LinearVisitor 16 4 – Knowledge Questions 20 Total 154 Obtained This test requires approx. 2 hours and accounts for 50% of your overall mark. Final Online Exam, Semester 1 2020 Page 1 of 9 COS30008 Semester 1, 2020 Problem 1 Dr. Markus Lumpe (104 marks) We wish to define a generic 3-ary tree in C++. We shall call this data type TTree. A 3-ary tree has a key fKey and three nodes fLeft, fMiddle, and fRight. Following the principles underlying the definition of general trees, a 3-ary tree is a finite set of nodes and it is either • an empty set, or • a set that consists of a root and exactly 3 distinct 3-ary subtrees. Somebody has already started with the implementation and created the header file TTree.h, but left the project unfinished. Complete the following code fragments. In particular, make sure that all elements are properly defined and no linker errors occur. #pragma once #include template cla ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4