[CMSC 437] | [Syllabus] | [Lecture Notes] | [Homework] | [Projects] | [Files] | [Notes, all]

CS437 Details of homework assignments and Quiz

    The most important item on all homework is YOUR NAME!
    Print. No readable name, no credit.
    Staple or clip pages together if turning in paper.
    Plan to demonstrate homework to the instructor in class,
    then submit or turn in a printed copy of your source code.
    submit cs437 hw1 your-file(s)-for-homework1
    submit cs437 hw2 your-file(s)-for-homework2  etc.
    Homework must be submitted when due.  You loose 10%, one grade,
    the first day homework is late. Then 10% each class thereafter.
    Max 50% off. A zero really hurts your average!

Turn in paper, or submit Homework

 The "submit" facility only works on the "gl" machines.
 The student commands are:
    submit   cs437 hw1 some_file or filelist
    submitrm cs437 hw1
    submitls cs437 hw1

Do your own homework!

You can discuss homework with other class members but DO NOT COPY!

All parties involved in copying get zero on that assignment.

Contents

  • Homework 1
  • Homework 2
  • Quiz 1
  • Homework 3
  • Homework 4
  • Quiz 2
  • Homework 5
  • Homework 6
  • Quiz 3
  • Other Links
  • HW1 Compile and Execute, 25 points

    This is to be sure you have a chance to pass the course:
    
    On some Microsoft windows system, yours or UMBC,
    a) compile and execute w1gl.c        a basic OpenGL program
    b) compile and execute W1frame.java  a basic Java program
    
    On some Linux (or in general Unix) system, yours or UMBC,
    d) compile and execute w1gl.c        a basic OpenGL program
    e) compile and execute W1frame.java  a basic Java program
    f) compile and execute w1.c          a basic X windows program
    
    On a Mac or any platform, in any language,
    g) compile and execute a program that brings up a window,
       draws lines (not using forms) and draws text in the same
       window as the lines. Make it similar to any w1* .
    
    Turn in the command you used to do any two (2) of a) through f),
    for g) turn in source code and command or what IDE you used.
    (It is OK, but not necessary, to say what setup you did.)
    Run the program for the instructor in class.
    
    Get detailed help from  GUI help on Windows and Linux
    
    The source code and libraries are available in many places,
    e.g. WEB download
         CD in class textbook for GLUT, OpenGL Utility Toolkit.
         a CD may be passed out in class
    
    If you could not do any of the six a) through g)  by the second
    class, you should consider dropping the course. It is OK if it
    took you four to eight hours to get the basic process working.
    Results are what is important.
    
    

    HW2 File, Open, 25 points

    Combine the concepts of Lecture 5 Menu and Lecture 6 Input Text
    to have a program read text in the graphics window, that text
    being a file name (of your programs source code) and reading
    and printing at least one line of the file in the graphics
    window.
    
    Typically, but not required, there would be a "File" menu and
    an item on this menu would be "Open" that asked for a file name.
    The area for inputting the file name may be fixed or can popup.
    
    This may be a small stand alone program in any language
    on any platforms. For your benefit it should be the same
    language and graphics as homework problem 1.
    
    'submit' your source code and demonstrate in class.
    (I do not have all possible environments to run your code.)
    
    or
    
    This may be embedded in your project application, assuming you
    started or are about to start your project.
    
    

    Quiz 1. 12.5% of course grade

    See Lecture 9
    

    HW3 Graphical Selection, 25 pts

    In the language of your choice, on the platform of your choice,
    show the code that provides for the user to select some item
    in the GUI. Graphical item selection, not menu selection.
    
    This can be a small stand alone program -or-
    your project as it is now providing the ability to select an
    item is working. You may, yet do not have to, do anything with
    the selected item. (Well, you should somehow clue the user about
    which item was selected.
    e.g. pick2.c  rubber2gl.c  Rubber2.java  Select.java  Select2.java)
    
    

    HW4 Display Fonts, 25 pts

    In the language of your choice, on the platform of your choice,
    write the code that displays at least two fonts in the GUI.
    The fonts may be, yet do not have to be, user selectable.
    
    This can be a small stand alone program -or-
    your project as it is now providing the ability to display
    a font is working.
    
    

    Quiz 2. 12.5% of course grade

    See Lecture 19
    

    HW5 Clock, 25 pts

     
    In the language of your choice, on the platform of your choice,
    write the code that displays a clock in the GUI.
    The clock can be analog or digital.
    
    The analog clock must have a second hand that moves reasonable
    accurately, the minute and hour hand are optional. The numbers
    from 1 to 12 are optional, the motion is the point of this
    homework.
    
    The digital clock must display at least  hh:mm:ss  and
    the seconds must be reasonably accurate. Yes, this is as
    simple as getting the date and time string and just writing
    it to the GUI display like any other text.
    
    This can be a small stand alone program -or-
    your project as it is now providing the ability to display
    time is working.
    
    The demonstration program for getting time in "C" is:
    time_of_day.c with sample output:
    
     0 CPU time 
     10 / 8 / 104 
     23 : 57 : 16 
     ascii string Tue Aug 10 23:57:16 2004
     
    waste time 0.035529 
     0.31 CPU time 
    
    
    For X Windows Motif analog clock,
    the classic program is xclock.c ,
    yet, it is designed to update once a minute and needs a second hand.
    
    For Java, date and time is obtained in the sample program:
    time_of_day.java with sample output:
    
    time_of_day from Java
    
    java.util.GregorianCalendar[time=1092208960278,areFieldsSet=true,
    areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=
    "America/New_York",offset=-18000000,dstSavings=3600000,useDaylight=true,
    transitions=235,lastRule=java.util.SimpleTimeZone[id=America/New_York,offset
    =-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,
    startMonth=3,startDay=1,startDayOfWeek=1,startTime=7200000,startTimeMode=0,
    endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],
    firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2004,MONTH=7,
    WEEK_OF_YEAR=33,WEEK_OF_MONTH=2,DAY_OF_MONTH=11,DAY_OF_YEAR=224,
    DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=2,AM_PM=0,HOUR=3,HOUR_OF_DAY=3,
    MINUTE=22,SECOND=40,MILLISECOND=278,ZONE_OFFSET=-18000000,DST_OFFSET=3600000]
    
    7/11/2004
    3:22:40
    278 milliseconds
    
    t1=1.092208960278E12
    t2=1.092208960325E12  t2-t1=47.0 milliseconds
    
    
    

    HW6 "Splash", 25 points

     
    In the language of your choice, on the platform of your choice,
    write the code that displays a "Splash" for three (3)
    seconds in the GUI. e.g. What some games do when you win or loose.
    This can be automatic or in response to a user action.
    (Use the information from samples in HW5 to get time.)
    
    This can be a small stand alone program -or-
    your project as it is now providing that the ability to display
    an event for a fixed time, is working.
    
    

    Quiz 3. 15% of course grade

    See Lecture 29
    

    Other Links

    Go to top

     Last updated 6/1/07