Go to the faculty page for James Tam Return to the CPSC 203 web page

CPSC 203: Final exam information

Since your final exam is relatively late, more information will be added here as we approach the exam date so you should check back here for updates

Date/location:

Review material:

Front cover from the actual exam (it has the exam instructions so make sure you look at this beforehand...important so make sure you read them beforehand!)...will be added

 

Material that you should study

 

How to prepare for the exam

As mentioned early in the semester, Computer Science isn't an area where you can just read a book or memorize a few points on a slide and expect to be proficient and have a deep understanding of concepts. While it is important to 'study' concepts, this traditional form of preparation is mandatory but not sufficient. Like any other hands-on area you evaluate and improve your knowledge and understanding by 'doing'. At the very least you should be attempting every assignment (full and mini). Going through the lab exercises will also help as does tracing the questions in TopHat Monacle. In lecture I sometimes give you examples of 'exam type' questions and extra problems for you try out on your own.

 

Exam topics

Lecture topics on the exam

Approximate proportion of exam2

VBA programming Proportion is in the 70 % range
Computer security (exclude slides 84 - 90, 116 - 131) Proportion is in the 20 % range
Building a webpage using html (exclude slides 27 to the end of the presentation) Proportion is in the single digit % range
Miscellaneous1  

If there are any "If there's is time" topics in the lecture notes then they will be on the midterm only if we talked about them in class.

1 The topic or topics being evaluated in the question doesn't fall neatly into one of the above categories e.g., the question covers materials that span multiple topics

Exam questions2

Multiple choice questions: 36 marks

 
  • 36 questions

Short answer questions: 24 marks

 
  • 3 questions require writing a VBA program or a partial programs
  • 1 question involves a trace of a VBA program

2 Based on a near-final version of the exam

VBA library documentation that will get for the final exam (keep in mind that not all library functions may have been covered during a particular semester)

  • Accessing the following VBA objects:
 
  • Application: the MS-Office program running
  • ActiveDocument: current MS-Word document
  • Selection: currently selected text
  • Useful methods and attributes of the Application object
 
  • Application.Windows.Count: number of open Word windows
  • Application.CapsLock: a Boolean to indicate whether caps lock is turned on or off
  • Useful methods and attributes of the ActiveDocument object  (complex uses of the object are included - out of order - after this list0
 
  • ActiveDocument.ActiveWindow.Caption = "<Caption>": change caption title in the Word window
  • ActiveDocument.Application: the application associated with the document
  • ActiveDocument.Checkspelling: run spell checker
  • ActiveDocument.Close (<wdPromptToSaveChanges> or <wdDoNotSaveChanges> or <wdSaveChanges>): close current Word window and apply the effect of specified constant
  • ActiveDocument.Comments.Count: the number of comments inserted into the document
  • ActiveDocument.CountNumberedItems: total number of bulleted and numbered items
  • ActiveDocument.DeleteAllComments: delete all comments from the active document
  • ActiveDocument.FullName: name & save path of the active document
  • ActiveDocument.HasPassword: a Boolean to indicate if the active document is password protected
  • ActiveDocument.InlineShapes.Count: number of inserted inline shapes in the document
  • ActiveDocument.InlineShapes(i).height : height of inline shape # 'i'
  • ActiveDocument.InlineShapes(i).width : width of inline shape # 'i'
  • ActiveDocument.InlineShapes.count : number of inline shapes in the active document
  • ActiveDocument.Name: name of the active document
  • ActiveDocument.password = "<Password>" : sets the password for the active document to the value specified
  • ActiveDocument.Path: save path of the active document
  • ActiveDocument.Printout: prints the active document
  • ActiveDocument.Save: saves the current document
  • ActiveDocument.Saved: a Boolean to indicate if the active document has been saved since last changed
  • ActiveDocument.SaveAs2("<filename>"): save and rename document
  • ActiveDocument.Select: select all the text in the active Word document
  • ActiveDocument.SendMail: sends email with the active document as an attachment
  • ActiveDocument.Shapes.Count: number of primitive shapes in the document
  • ActiveDocument.Shapes(i).Delete : delete shape # 'i'
  • ActiveDocument.Shapes(i).height : height of shape # 'i'
  • ActiveDocument.Shapes(i).width : width of shape # 'i'
  • ActiveDocument.Shapes.count : number of shapes in the active document
  • ActiveDocument.Shapes(i).Fill.ForeColor = e.g. vbRed, vbBlue, vbGreen, vbYellow, vbBlack, vbWhite, vbBlack : sets Shape  # 'i' to the specified color
  • ActiveDocument.SpellingChecked: a Boolean to indicate if the active document has been spell checked since last changed
  • ActiveDocument.SpellingErrors.Count: the number of spelling mistakes in the active document
  • ActiveDocument.Tables(i)
    • Allows access to one table from the collection of tables.
    • 'i' is a positive integer (i.e. >= 1)
  • ActiveDocument.Tables.Count: number of tables in the active document
  • ActiveDocument.Tables(i).Sort(<Boolean>): 'i' is a positive integer, sorts the table specified by 'i' in the active document, the Boolean specifies if it is true that the table’s first row is header or title row which is not sorted
  • ActiveDocument.Words.Count: number of words in the MS-Word document
  • ActiveDocument.Words.Comments.Count: number of annotation comments in the MS-Word document 
  • ActiveDocument: find and replace text
      ActiveDocument.Content.Find.Execute FindText:="<text>", ReplaceWith:="<text>", _  
        Replace:= <wdReplaceAll>, MatchCase:= <Boolean>
  • ActiveDocument: find and replace font effects (turn on/off)
       With ActiveDocument.Content.Find
          .Font.<Font effect> = <Boolean>
          With .Replacement
            .Font.<Font effect> = <Boolean>
          End With
         .Execute Replace:=wdReplaceAll
       End With
  • ActiveDocument: find and replace text styles in a document
      With ActiveDocument.Content.Find
         .Style = "<Search style>"
         With .Replacement
           .Style = "<Replacement style>"
         End With
      .Execute Replace:=wdReplaceAll
    End With
  • Counting the number of instances of a particular word in a document
     With ActiveDocument.Content.Find
         Do While .Execute(FindText:=<"searchWord">, Forward:=True, _
             MatchWholeWord:=<True or False>) = True
             <Do something when each instance of search word is found>  
         Loop
    End With

     
  • Useful methods and attributes of the Selection object
 
  • Selection.Copy: copy selected text
  • Selection.ClearFormatting: remove formatting effects (e.g. bold) from selected text
  • Selection.Delete: deletes selected text
  • Selection.EndKey Unit:= <wdStory>: move selection to the end of the document 
  • Selection.Expand: expand selection to next grouping size of text
  • Selection.Font.Bold = <Boolean> : turn bolding on or off
  • Selection.Font.Bold = wdToggle: toggle bolding
  • Selection.Font.Name = <Font name> : change font type
  • Selection.Font.Size = <Size> : change font size
  • Selection.Font.ColorIndex = <Word constant for color e.g. wdBlack, wdBlue, wdBrightGreen, wdDarkBlue, wdDarkRed wdDarkYellow, wdGray25, wdGray50, wdGreen, wdPink, wdRed, wedTeal, wedTurquoise, wdViolet, wdWhite, wdYellow)
  • Selection.Font.Italic = <Boolean> : turn italics on or off
  • Selection.Font.Italic = wdToggle: toggle italics
  • Selection.Font.Underline = <Boolean> : turn underlining on or off or change the type of underlining (wdUnderlineNone, wdUnderlineNone, wdUnderlineSingle
  • Selection.HomeKey Unit:= <wdStory>: move selection to the top of the document
  • Selection.InsertFile(<filename>): replace selection with the text from the specified file
  • Selection.MoveLeft: move cursor left
  • Selection.MoveRight: move cursor right
  • Selection.ParagraphFormat.Alignment = <wdAlignParagraphCenter or wdAlignParagraphLeft or wdAlignParagraphRight>: to center, left or right align a paragraph (respectively)
  • Selection.ParagraphFormat.SpaceAfter = <# points e.g. 0, 3, 6 etc.): Adds extra spacing to the end of paragraph
  • Selection.ParagraphFormat.LeftIndent = InchesToPoints(# inches): # inches for left indenting of a paragraph
  • Selection.ParagraphFormat.RightIndent = InchesToPoints(# inches): # inches for right indenting of a paragraph
  • Selection.PasteAndFormat (<wdFormatOriginalFormatting or wdFormatPlainText>): copied text is pasted with the specified formatting
  • Selection.text = <"Selected text"> : writes the selected text to the document by setting the text attribute directly
  • Selection.Type : returns information about the type of information selected (if any: < wdSelectionIP - none> <wdSelectionNormal - text selection> <wdSelectionShape - graphical shape selected> )
  • Selection.TypeText(<"Selected text">) : writes the selected text to the document through the method TypeText()
  • Common and useful collections
 
  • Documents(): the collection of documents currently opened InlineShapes(): includes all the external images inserted into a Word document
  • Lists(): all the lists in a Word document
  • Shapes(): all the primitive shapes in a Word document
  • InlineShapes(): all the images inserted into a Word document
  • Tables(): all the tables in a Word document
  • Useful methods and attributes of the Documents collection (the Shapes, InlineShapes and Tables collections can be accessed via the ActiveDocument collection)
 
  • Documents.close(<wdPromptToSaveChanges> or <wdDoNotSaveChanges> or <wdSaveChanges>): closes all of the open Word documents  Close all open Word documents and apply the effect of specified constant
  • Documents.count: returns a positive integer that is equal to the number of documents currently opened.
  • Documents.Item(i):
    • Allows access to one document from the collection of documents.
    • 'i' is a positive integer (i.e. >= 1)
  • Documents.Open (<"location and name">): opens the document with the specified location and name and adds it to the documents collection
  • Documents(i).PrintOut: print the document accessed through the index
  • Documents(i).Save: save the document accessed through the index
  • Documents(i).SaveAs (<"name">): save the document (accessed through the index) under another name
  • Useful functions/methods
 
  • CreateObject("<Name of MS-Office application>"): starts up the Office application specified in the brackets. Dir("<Path to a folder>") : returns the name of a document under the specified path
  • Dir("<Path to a document>") : returns the name of the document under the specified path
  • Dir : after the path to a folder has been specified with a previous call to Dir, this call returns the name of the next document in the specified folder
  • Len(<string>): this function returns the number of characters in the specified string
  • <Name of an excel spreadsheet variable>.workbooks.Open("<Path and name of an Excel spreadsheet/worksheet>"): opens up the Excel spreadsheet at the specified location.
  • <Name of an excel spreadsheet variable>.Range("<Cell in a spreadsheet>").Value: Returns as a string the contents of the cell of spreadsheet referred to by the spreadsheet variable.
  • Excel methods (accessible via VBA run through Word)
 
  • <reference to an Excel window>.Visible = <Boolean> : Makes an Excel window visible or not visible
  • <reference to an Excel window>.workbooks.open("<Path to an Excel document">) :Opens the Excel document named under the specified path and returns a reference to that document.
  • <reference to an Excel window>.range("<Cell address>").Value : returns the contents of the specified cell
VBA methods (writing a program using Excel)
 
  • Attributes of the Range object
    • Range(cell address).Value : Access the contents of a cell at the specified cell address
    • Range(cell address).Font.Bold = <Boolean> : Turns bolding at the specified cell address on/off
    • Range(cell address) = <Value>  : Assigns a value to the cell at the specified address
VBA methods (writing a program using PowerPoint)
 
  • The ActivePresentation object (method)
    • ActivePresentation.Slides.Add Index := <Slideshow index to add a new slide>, Layout := <Slide layout:ppLayoutCustom, ppLayoutBlank> : adds a new slide at the specified index with the specified layout
  • The ActivePresentation object (attribute)
    • ActivePresentation.Slides.Count : the current number of slides in a slideshow (PPTX file)

As mentioned VBA documentation WILL NOT be provided for the following (you're expected to know how to apply them without documentation)

VBA concepts that you did learn and are expected to know

(This is only a quick overview, you should look to the course notes for details)

You could see exam questions that involve any of the above questions in the form of VBA code writing or a program code trace.

HTML Tags that you will be given during the exam