Project Information

  • Term Project Descriptions: PDF


  • Testing Environment:
    The Java version on Pitt's unixs machine is "1.6.0_37". We will test your projects only on pitt unixs machine. Although you are free to develop your project in a different environment, you should make sure your code works in the Pitt unixs environment before submitting your project.

  • Demo Program
    To help you started, see Recitation 8. You can also downlod and execute the following demo Java program: JavaDemo.java. The JavaDemo has all the code and an example embedded in it. You can use this program as a skeleton for your project.

  • dayofweek
    Unfortunatelly, dayofweek() is not working as advertised in the latest version of the Oracle manual. This applies to both sqlplus and Embedded SQL. Instead please use "to_char()". You can read the Oracle SQL Reference manual for details (pg 3-52).

    Here's a quick overview:

    select to_char(mydate, 'DY') from .....
    --> returns "sun", "mon", "tue", "wed", "thu", "fri", or "sat".
    
    select to_char(mydate, 'D') from .....
    --> returns 1-7 (with 1 being sunday)
    
    * mydate must be a date attribute from a relation.

    If instead of a date type, you have a string that you want to figure out which day of the week it falls on, you need to also use to_date(). For example:

    select to_char(to_date('19-apr-2003'), 'DY') from .....
    --> returns "sat"
    
    select to_char(to_date('19-apr-2003'), 'D') from .....
    --> returns 7