CIS 29 - Notes for Tuesday, 1/9


Announcements and Reminders

Topics

The Syllabus

The Textbook:  Professional C++ by Marc Gregoire - how to use it

The Course Notes ( MS Word Document        PDF File )  - how to use it / expect updates throughout the quarter


Programming Assignments
  • Email source code.  Check your code before sending it.  Once received, it will be graded.  You do not get a chance to correct your errors after submitting it.
  • In the email, use CIS29 / Ass# as the email subject
  • Add the source code as an attachment.  Name it ass#.cpp (where # is the assignment number).  You may be asked to submit multiple files - send them as a zipped attachment.
  • Add comments to your source code including your name, the assignment #, and the compiler and operating system used.
  • The code will be compiled and run on either Code::Blocks or NetBeans running on Windows or Linux.  If the code does not compile and run there, you will not get full credit for the assignment.
  • Do not ask the instructor to "check" your code.  You should know if you fulfilled the requirements of the assignment.
  • Assignments are due by 9:30 am on the due date specified. Assignments will be accepted late with a 5 point penalty if they are received within 24 hours of the due date (time).  After that time, they will not be accepted. 
  • You will be penalized 1 point on the assignment if you do not have a comment with your name, assignment #, compiler and operating system used.
Tests
  • Open book / books
  • No computers, tablets, e-readers, phones, etc. (this is subject to review)
  • Timed
  • No makeups without prior approval
The Group Project
Academic Integrity Policy

Computer Lab Hours

Monday – Thursday                9 am – 8 pm
Friday                                       9 am – 4 pm
Saturday and Sunday             CLOSED

Computer Lab Rules
  • Eating and drinking are not allowed in the main lab and the classrooms.
  • All bottled water or soda cans should not be visible on the desks and should be kept in bags or backpacks.  Any beverage containers with liquid, include disposable coffee and soft drink cups must be finished before students enter the Computer Lab and ATC classrooms.
  • Students are not permitted to change or modify the monitor setting in ATC203 Computer Main Lab from horizontal to vertical mode.


Review

Classes, Constructors, and  Desctructors

Example 1-1 – Card and Deck class (old code)

Example 1-2 – Card and Deck class (revised)

Example 1-3 – Card and Deck class (another revision)

Example 1-4 – Adding Matrices

Maybe You Haven’t Covered This

Example 1-5 - Conversion of a user-defined type to a primitive type

Example 1-6 - More Conversions of a user-defined type

Explicit Constructors

The keyword explicit is used to specify that a constructor may only be used for object instantiation and not for automatic conversion.  Here’s an example that demonstrates the effect.

Example 1-7 – Explicit constructors

typedef and using

The keyword, typedef, originally from C, is used to define a type.

C++ 11 introduced the keyword, using to act like typedef.

typeid operator

The typeid operator returns an identifier of a type, a variable or an expression.  The return of the typeid is a class type, called type_info.  You can use the name() member function of the type_info class to display a literal description of the type.

Example 1-8 – typedef, using, typeid