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

CS437 Details of homework assignments and Quiz

You will submit homework source code and output on GL after 9/27/2021.
Homework grade is recorded based on submission.

/ not online/ 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.

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 homework is to be sure you have a chance to pass the course:
    You get to choose the operating system, programming language
    and graphics library for your homework and project. The
    purpose of the homework is to demonstrate GUI tasks that
    may be used in your project. 
    
    You need to do any three of the following:
    You may do more.
    
    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
    c1) compile and execute w1wx.py       a basic Python2 program or
    c2) compile and execute w1wx.py3      a basic Python3 program and
    c3) compile and execute w2wx.py3      a basic Python3 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 w1tk.py3 or w1qt.py a basic Python program
    f1) compile and execute w2tk.py3     a mouse test Python program
    g) compile and execute w1.c          a basic X windows program
    
    On a Mac or any platform, phone, pad, in any language,
    h) 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* .
    
    i) compile and execute an equivalent program to w1* in
       some other language with a graphics library.
    
    j) install and run JavaScript in a HTML5 w1.html file
       and view it in your browser
    
    Submit file with your name and
    name of operating system and the command you used
    to do any three (3) of a) through  j)
    (It is OK, but not necessary, to say what setup you did.)
    Run the three programs for the instructor in class.
    (On your laptop or lab computer.)
    
    Get detailed help from  GUI help on Windows and Linux
    
    The source code and libraries are available in many places,
    e.g. WEB download
    
    If you could not do any of the ten a) through j)  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 so that you will be able to
    do your project.
    
    

    HW2 File, Open, 25 points

    Combine the concepts of Lecture 5 Menu and Lecture 6 Input Text.
    Write and demonstrate a program that has the user enter a
    file name into your graphics window and then read that file
    and display the file in a 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 you are planning to use in your project.
    
    Remember, it has to be a server side file in JavaScript or
    a local file on phone or pad.
    
    Just submit source code and at least one image.
    submit cs437 hw2 your_files
    
    

    Quiz 1. 12.5% of course grade

    See Lecture 9 and Lecture 10, link
    
    last name  a-j a,  last name  k-r b,  last name  s-z c
    
    Download into your directory on linuc.gl:
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q1_f21a.doc  .
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q1_f21b.doc  .
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q1_f21c.doc  .
    
    Answer with libreoffice or Microsoft Word
    
    submit cs437 quiz1 q1_f21a.doc    or .docx
    submit cs437 quiz1 q1_f21b.doc    or .docx 
    submit cs437 quiz1 q1_f21c.doc    or .docx depending on last name.
    
    

    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.
    The selection may change the color or provide some other
    feedback to the user, showing what was selected..
    
    This can be a small stand alone program or the beginning of
    your project that is now providing the ability to select an item.
    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.)
    The selection may change the color or provide some other feedback
    to the user, showing what was selected.
    
    e.g. pick2.c  rubber2gl.c  Rubber2.java  Select.java  Select2.java)
    submit cs437 hw3 your_source and at least one image
    
    

    HW4 Display Fonts or Real 3D 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.
    Each font should be in two sizes. eg 12 and 24, your choice.
    The fonts may be, yet do not have to be, user selectable.
    
    Or, do a real 3D program for use with or without glasses.
    
    This can be a small stand alone program or the beginning of
    your project that is now providing the ability to display
    more than one font..
    
    submit cs437 hw4 your_source and at least one image
    
    

    Quiz 2. 12.5% of course grade

    See Lecture 19
    last name  a-j a,  last name  k-r b,  last name  s-z c
    
    Download into your directory on linux.gl:
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q2_f21a.doc  .
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q2_f21b.doc  .
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q2_f21c.doc  .
    
    Answer with libreoffice or Microsoft Word
    
    submit cs437 quiz2 q2_f21a.doc    or .docx
    submit cs437 quiz2 q2_f21b.doc    or .docx 
    submit cs437 quiz2 q2_f21c.doc    or .docx depending on last name.
    
    
    

    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 the beginning of
    your project that is now providing the ability to display
    time.
    
    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 
    
    Python3 demo of time and date
    now.py3 source code
    now_py3.out output time and date
    
    
    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
    
    Sample code to get time and output at 5 second intervals:
    (You must display one in a graphics window for homework.)
    time_test.c
    time_test.java
    time_test.py
    time_test.f90
    
    submit cs437 hw5 your_source and at lease one image
    

    HW6 "Splash" or motion, 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. You have something on the screen that
    the user can see. Three seconds later you add something
    to the screen, not deleting what is already there.
    
    e.g. What some games do when you win or loose.
    This may start automatically or in response to a user action.
    Or, do something with motion that uses timing to control
    the speed, and stops after some reasonable, pre programmed time.
    
    (Use the information from samples in HW5 to get time.)
    
    This can be a small stand alone program or the beginning of
    your project that is now providing the ability to display
    an event for a fixed time.
    
    submit cs437 hw6 your_source and at least one image
    

    Quiz 3. 15% of course grade

    (Also known as a final exam.)
    See Lecture 29
    last name  a-j a,  last name  k-r b,  last name  s-z c
    
    Download into your directory on linux.gl:
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q3_f21a.doc  .
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q3_f21b.doc  .
    cp /afs/umbc.edu/users/s/q/squire/pub/download/q3_f21c.doc  .
    
    Answer with libreoffice or Microsoft Word
    
    submit cs437 quiz3 q3_f21a.doc    or .docx
    submit cs437 quiz3 q3_f21b.doc    or .docx 
    submit cs437 quiz3 q3_f21c.doc    or .docx depending on last name.
    
    

    Other Links

    Go to top

     Last updated 11/28/2021