CSE687 - Object Oriented Design

Project #1 - Survival Guide

Revised: 4/28/2011
Home Courses Code Handouts CoreTech Books Articles Math Research Masters Projects SWDev WebDev News OtherLinks SiteDesign Graduates AllPages Office Hours Notices

CSE681-SWMAA CSE686-IP CSE687-OOD CSE775-DO CSE776-DP CSE778-AWP CSE784-SWS

Lecture #01 Lecture #02 Lecture #03 Lecture #04 Lecture #05 Lecture #06 Lecture #07
Lecture #08 Lecture #09 Lecture #10 Lecture #11 Lecture #12 Lecture #13 Lecture #14
Lecture #15 Lecture #16 Lecture #17 Lecture #18 Lecture #19 Lecture #20 Lecture #21
Lecture #22 Lecture #23 Lecture #24 Lecture #25 Lecture #26 Lecture #27 Lecture #28

Syllabus SG - OOD SG - Design SG - Templates SG - Class Relationships

Web Resources:

Stroustrup's Home Page, Assoc. of C/C++ Users, C++ at Microsoft, Code Project, Sells Brothers, Guru of the Week, C/C++ User's Journal, devCentral, Dr. Dobb's Journal, Boost Library,

Content:

This page provides suggestions for bringing Project #1 to completion.
  1. Background

    Relationships code
    If you don't understand this you can't do the Project.
    STL Demo code
    Look at SimpleVector.cpp and Vector.cpp.

  2. Starting code set

    Project #1, Parser, useful for Project #1
    This project introduces you to XML DOM and scopes, modules, encapsulation, and XML analysis applications.

    Resources for Project #1:
    Parser stripped of everything except Tokenizer, XmlElementParts, and XmlParserPrototype
    M-ary Tree

  3. Step #1 - start parsing

              XmlElementParts parts(&toker);
              while(parts.get())
              {
                if(parts[0] == "<")  // isn't text node
                {
                  if(parts[1] == "?")
                  { 
                    // make XmlNode
                    // store processing instruction under document node
                    continue;
                  }
                  if(parts[1] == "!")
                  { 
                    // make XmlNode - just stores text of comment
                    // store comment as child of top node on stack
                    continue;
                  }
                  if(parts[1] == "/")
                  { 
                    // end of element so pop node stack
                    continue;
                  }
                  // make XmlNode with names and attributes
                  // this is a new element so push onto node stack
                  continue;
                }
                // make XmlNode with text
                // this is a text node so store as child of top node on stack
              }
            
  4. Define Document Tree and its Wrapper, XmlDocument