The following 343 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

5th   72th   about   add   adding   Additional   additional   algorithms   alice   aligned   all   allowed   along   amount   an   and   answers   asked   assignment   Assignment   Assignment3   assignment3   assume   assuming   at   automatically   avoid   basically   be   because   beginning   best   between   Bezoari   big   blank   blown   boxes   break   built   bunch   but   by   called   can   Can   carriage   case   cdecl   character   characters   Child   class   classes   column   come   Comment   considering   constitute   constraints   containers   containing   control   Control   conversation   correct   correctly   course   cs148   deal   default   defining   dependencies   dependency   dependent   designated   destroy   developing   device   Discussion   display   Drawables   each   easy   edu   either   empty   exceeds   Express   external   few   file   files   fine   followed   following   font   For   for   frequently   from   full   function   functions   get   Get   given   Go   goes   good   got   grade   handin   handy   hasn   heuristics   hyphenate   hyphenation   Hyphenation   If   if   ignore   in   In   inch   information   Input   interpret   interpretation   into   involing   justified   K2019   large   last   layout   least   left   length   less   lib   library   libst   like   line   lines   Linkage   linkage   Linker   Linking   Linux   list   lists   ll   loaded   long   look   looks   Mac   machine   make   Makefile   many   maximum   mean   might   minimum   mode   modified   my   natural   need   Next   No   no   Node   non   Note   number   obj   obtain   of   on   one   only   opening   Or   or   other   Otherwise   our   out   output   page   Page   Paolo   paragraph   paragraphs   per   permit   pixels   please   point   points   post   preferred   pretty   preventing   probably   Problems   professional   project   properties   provide   provided   public   put   quality   Question   questions   quickest   rather   re   read   realize   recommend   referenced   Remember   remove   reporting   require   requirements   response   rest   results   return   Return   run   S106a   same   say   Scanner   Scene   scolution   see   seems   self   separation   seperation   share   should   significant   Since   size   so   space   spaced   spaces   spacing   Specifically   Ss   staff   stanford   starts   stated   store   straightforward   strtok   struct   Student   Studio   sure   symbol   text   than   thanks   that   That   The   the   their   them   there   these   this   thiscall   title   to   total   toward   treat   Ts   two   typesetting   typographers   under   Under   units   Unix   unresolved   us   use   using   usually   V1   vcproj   ve   vector   version   violated   Visual   vs2005   want   warnings   way   We   we   what   When   when   Which   which   whitespace   Whitespace   width   will   win0607   Windows   with   without   won   word   words   works   would   wrapper   writing   Yes   You   you   your   yourself   zip  

    Assignment3Discussion

Assignment 3 FAQ and Student Discussion Page

The course staff will post answers to frequently asked questions about assignment 3 here. Feel free to add to this page yourself if you've got information to share with the rest of the class. Remember, the quickest way to get a response from a TA is to post to cs148-win0607-staff@lists.stanford.edu

Return to the Assignment 3 page.

Comment: VS Express Linkage Problems

If you are using Visual Studio Express 2005 and obtain linkage warnings involing libST functions that look like this:

Linking...
layout.obj : error LNK2019: unresolved external symbol "public: class
STSceneNode * __thiscall STSceneNode::GetNext(void)"
(?GetNext@STSceneNode@@QAEPAV1@XZ) referenced in function "void
__cdecl destroyDrawables(class STSceneNode *)"
(?destroyDrawables@@YAXPAVSTSceneNode@@@Z)
layout.obj : error LNK2019: unresolved external symbol "public: class
STSceneNode * __thiscall STSceneNode::GetFirstChild(void)"
(?GetFirstChild@STSceneNode@@QAEPAV1@XZ) referenced in function "void
__cdecl destroyDrawables(class STSceneNode *)"

It's probably because VS Express hasn't correctly loaded the libst library dependencies from our project/scolution files (all this works fine in the full blown version of Visual Studio). You'll need add libst.lib as an additional dependency in your assignment3 project.

Go into the project properties > Linker > Input and adding libst.lib to the list of 'Additional dependencies'.

(thanks to Paolo Bezoari for reporting this)

Comment: Control characters under Unix/Mac

If you're developing on a non-Windows machine and see control characters (empty boxes) in your output, make sure to remove the carriage return character ('\r') when you read from the text file. Under Windows, opening files in text mode should deal with this automatically, but other OSs won't.

Question: Since the file alice.txt starts with a blank line it has a title of 0 length correct?

'alice.txt' should have a title.

  • We'd like you to treat the text from the beginning of the first non whitespace character of the file to the first

paragraph break as the first paragraph. A paragraph break is designated by *at least* one line containing only whitespace in between two paragraphs. Whitespace lines, followed by a bunch of text, following by a bunch of blank lines, followed by a bunch of text, would constitute two paragraphs.

Question: Do we have to deal with the case in which one word exceeds the column width? Or can we put at least one word per column?

Yes, you can assume at least one word per column. Otherwise we would have to also require you to hyphenate words. We ignore hyphenation in this assignment.

Question: the requirements say that the default spacing between words should be X/4 but no less than X/5. Is there a maximum spacing between words?

In this assignment there is not, and we realize a line with a few big words that is full justified might have a significant amount of space between words. You should put as many words on a line as you can without violated the two stated constraints.

Note that professional quality typesetting algorithms have a large number of heuristics built into them to avoid large spaces between words. Hyphenation goes a long way toward preventing long spaces.

FYI, For best results, typographers recommend that the maximum spacing be M/2. That usually looks good.

Question: Are we allowed to use other ADTs? Specifically, I want to use the vector class (given out in CS106a) to store my words rather than defining a struct and re-writing the same code. Also classes like Scanner (basically strtok with a wrapper) would come in handy. Can I use these?

Yes, we permit you to use CS106a classes or containers provided by C++ STL provided that:

You make it easy for us to run and grade the code on either Windows or on Linux. In your zip file handin, please provide a modified version of /assignment3/Makefile or /assignment3/layout_vs2005.vcproj (or the 2003 version if that's what you're using) along with all the files in your project.

Question: When you say "The default (preferred) word spacing should be 1/4 the font size," I'm assuming this is only for left-aligned text (i.e. the last line of each paragraph)? It seems that for a line of justified text with n words, the spacing is dependent on the number of words in the line and their total width.

Yes, that is the correct interpretation.

Question: When you say "No two words can be spaced CLOSER than 1/5 the font size", do you mean "the minimum PIXEL separation is 1/5th the font POINT size"? Which units are pixels and which are points?

If a font is X points. The minimum word seperation should be X/5 points, and the "preferred" or so-called natural spacing for left-aligned text is X/4 points.

The conversation to pixels is pretty straightforward, considering you should interpret the display as a 72 DPI device, and one point is 1/72th of an inch.

Recent