COSC 5910 – Winter 2005
Software Foundations


Instructor:

Office:

Office Hours:

TA

Last update:

Scott MacKenzie

CSE 3045

Monday 10:30 – 11:30, Thursday 10:30 – 11:30

TBA

28-Mar-05

Main page for 5910


Mar 28, 2005 – The final exam is now prepared.  The total number of marks is 91, divided as follows: Part A, 35 true/false questions (1 mark each); Part B, 13 multiple choice questions (3 marks each); Part C, 2 programming questions, one worth 8 marks and one worth 9 marks.  As I mentioned in class, the emphasis is on the second half of the course text, but knowledge of the entire text is required.  Good luck.  See you Wednesday.


Mar 24, 2005 – Here is the code for the Chapter 10 programming challenge, DemoCharFreq.java.


Mar 21, 2005 – Here is a link to Project Gutenberg, the web site I mentioned  in our last class where free electronic books are available.


Mar 16, 2005 – Here are the notes for Chapter 10, Chapter 11, and Chapter 12, and the source files for the demo programs:  DemoArrayList.java | DemoHashSet.java | DemoHashMap.java | DemoWordFreq.java | sample.txt | d1-wordfreq.txt | GulliversTravels.txt | ExceptionHandling01.java | ExceptionHandling02.java | ExceptionHandling03.java | ExceptionHandling04.java | ExceptionHandling05.java.

 

Also, here is the usage message for the programming challenge, DemoCharFreq.java.  Note that this is just an example.  Your program can offer different options, etc.

 

-----------------------------------------

usage: java DemoCharFreq file [options]

where 'file' is any text file

(NOTE: map elements are tokens in file)

 

The following options are supported:

 

   -u     include uppercase characters

   -l     include lowercase characters

   -d     include digit characters

   -c     convert uppercase to lowercase

   -s     include space character

   -p     include punctuation characters

   -os    output size of map

   -oe    output elements in map

   -osbk  output map, sorted by key

   -osbv  output map, sorted by value

-----------------------------------------


Mar 9, 2005 – Here are the notes for Chapter 9 and the source files for the demo programs: DemoInstanceof.java | creditcards2.txt | DemoToolkit.java | DemoCalendar.java | DemoRectangle.java |


Mar 3, 2005 – Please note: The course evaluation for COSC 5910 will take place on Wednesday, March 23, at 11:05 a.m.


Feb 17, 2005 – The midterm exam is now prepared.  Here’s the scoop. The exam is in three parts.  Part A (23 marks) has ten short-answer questions that involve, for the most part, examining bits of code and answering questions about the output.  Part B (15 marks) and C (11 marks) each have one programming question.  The programs are simple but may require a few dozen lines of code.  API information is given in appendices, as appropriate.  The exam covers the first seven chapters in the text, but the emphasis is on the first five chapters.  Good luck.  See you next Wednesday.


Feb 9, 2005 – Here are the slides for Chapter 7 and Chapter 8 and the source files for the demo programs:  Trajectory.xls | Trajectory01.java | Trajectory02.java | Trajectory03.java | Trajectory04.java | Trajectory.txt | DemoPortfolio.java | DemoGlobalCredit.java | creditcards.txt.


Feb 7, 2005 – Just a reminder…  Please do the three Programming Challenges I gave in class last week.  A description of each is found in the slides for Chapter 6 (slides #15, #17, and #24).


Feb 2, 2005 – Further to our discussion in class today, the following statements…

 

          String s1 = "hello";

          String s2 = s1;

          s1 = null;

          System.out.println(s2);

 

Print “hello”.  Despite the fact that s1 is declared null, the String object referenced by s1 is not deleted (i.e., made available for garbage collection), because s2 still references it.  An object is only deleted if there are no longer any references to it, and this is not the case in the example above.

 

On another subject discussed in class, if you wish to get a line of input from the keyboard without using the type package, you can do it as follows:

 

          BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));

          String s = stdin.readLine()

 

Note that the first line is only needed once.  Of course, input can still arrive from a file if input redirection is used.


Feb 2, 2005 – Here are the notes for Chapter 5 and Chapter 6 and the source files for the demo programs: Example09.java | Example10.java | Example11.java | Example12.java | Example12a.java | Example12b.java | Example12c.java | Example12d.java | Example13.java | Example14.java | Example15.java | Example16.java | Example17.java | Example18.java | Example19.java | CharFreq.java | Substitute.java | CodeToDay.java | DayToCode.java | WordsBackward.java | RegexExample.java | DemoStringArray.java | DemoEncrypt.java | DemoDecrypt.java | sample.txt.

 

Just to confirm what we decided in class today: The final exam will take place during our last class.


Jan 31, 2005 – I won’t be able to make it to my office hours today, due to some computer problems that need to be corrected asap.  My office hours will be tomorrow instead (same time).


Jan 19, 2005 – Here are the notes for Chapter 4 and the source code for the demo programs: Mortgage03.java | Example07.java | Example08.java | PointClass.java | TestPointClass.java.


Jan 12, 2005 – Here are the notes for Chapter 3 and the source code for the demo programs: Example04.java | Example05.java | Example06.java | Mortgage01.java | Mortgage02.java.  Remember…  There is a Programming Challenge in the last slide in Chapter 3.  Please do this for next week's class.


Jan 11, 2005 – Current versions of Java and the york package are available in the following on-campus labs:

·        WSC (William Small Centre - the parking structure2 across from CB)

·        TEL (close to Schulich)

·        Jupiter (Petrie bldg)

·        Prism (CSE bldg – but only if you have a cs account)

Please work in one of these labs (or on your home computer) when developing programs for 5910.  Hopefully, we can soon add the Schulich lab to the list.  Currently, I am waiting confirmation from the tech staff that the york package has been added to Java in the Schulich lab.  I'll keep you posted on this.

 

Please remember that the deadline for eCheck'ing Check02A.java is this Sunday at midnight.  Two students have already done this.


Jan 11, 2005 – Here are links for the two APIs needed for 5910:

·        type API (web)

·        Java API (web)

·        type API download page (if you want a copy on your personal machine)

·        Java API download page (if you want a copy on your personal machine)

Understanding and using Java APIs is the topic of Chapter 3 in the textbook.  We'll discuss this in class tomorrow.


Jan 7, 2005 – Here are the INSTRUCTIONS for using your home computer or a campus computer to edit, compile, run, and eCheck your Java programs.  So far, I have only received email from students Searle, Cen, Li, and Oh requesting a password (see yesterday's posting).


Jan 6, 2005 – Very soon, I will post instructions for doing the eCheck exercises at the end of each chapter.  One of the steps will require you to enter a password.  Obviously, the password cannot be posted with the instructions.  So… Please send me an email asap, and I'll reply with your password.  My email address is mack@cs.yorku.ca.  Include your full name and 9-digit York ID in the email.  Thanks.


Jan 5, 2005 – Here are the notes for Chapter 1 and Chapter 2, presented in class today. As well, you might like to get the source code for the demo programs: Lab1.java | DemoRemainder.java | Example01.java | Example02.java | Example03.java | Area.java.


Jan 3, 2005 – We'll be covering the first two chapters of the course text in our first class this Wednesday.  If at all possible, try to get the text and read these chapters beforehand.  The text is available in the Bookstore.  Note: the web page for the course text is http://www.cs.yorku.ca/~roumani/jba/


Dec 2, 2004 – COSC 5910 web page up and running.  Look here for announcements, downloads, etc.