102_2012_1_b - COS1512/102/1/2012 Tutorial Letter...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
COS1512/102/1/2012 Tutorial Letter 102/1/2012 Introduction to Programming II Semester 1 School of Computing Invitation to Workshop Bar code COS1512
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 CONTENTS 1. Invitation to Workshop…………………………………. .………………………………………. ...2 2. What to bring with to the workshop……………………………………………………………. ...2 3. Workshop Exercise…. .…………………………………………………………………………. ....2 Please note / important notes: To gain admission to the examination you have to submit Assignment 1 in time. The due date is 17 February.
Background image of page 2
COS1512/102 3 1 INVITATION TO WORKSHOP Many students find this module difficult to tackle. For this reason a workshop on objects, the main focus of this module, is offered during March. The date and nature of the workshop is scheduled to assist students in mastering the basic principles regarding objects before / while attempting assignment 2. Full particulars appear below: City Date Time Venue Pretoria 13 March 2012 8h30 to 14h00 Lab 1.04, Building 14, Sunnyside Campus Corner of Walker and Mears Streets Sunnyside Pretoria The workshop will take place in a computer laboratory. Because there are only a limited number of computers available, students will have to share computers. Students will be expected to do the exercise supplied in section 3 in this tutorial letter. No additional material will be covered during the workshop, nor will lectures be given. However, a comprehensive solution to the workshop will be sent out afterwards. Please read the following material in preparation for the workshop: Chapters 10 to 12 in Savitch Appendix F of Tutorial Letter 101 (the Study Guide) Section 4 Separate Compilation: Creating Dev-C ++ Projects with Multiple Files in Appendix A of Tutorial Letter 101. You are also encouraged to attempt the exercise beforehand. If you feel you have mastered this material, there is no need to attend the workshop. 2 WHAT TO BRING WITH TO THE WORKSHOP Bring this tutorial letter, your text book, Tutorial Letter 101 and a flash disk onto which to save your work to the workshop. 3 WORKSHOP EXERCISE Create a class called TimeType to implement the time of day in a program. This represents a simplified version of a watch. To do this, three files are required: A header file TimeType.h , that contains the specification of the TimeType class (the interface to the class); an implementation file TimeType.cpp , that contains the implementation of the TimeType class and a main application file TestTimeType.cpp to test the class TimeType . This file contains the main() function. A skeleton of the class specification is given below:
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 class TimeType { public: : : private: int hrs; //hrs < 24 //If hrs is incremented to 24 it should be reset to 0 int mins; //mins < 60 int secs; //secs < 60 }; The TimeType class specification includes the following: a default constructor that initialises the hours, minutes and seconds to 0 ;
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

102_2012_1_b - COS1512/102/1/2012 Tutorial Letter...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online