Queen's Logo

CISC 124: Introduction to Computing Science II

(Fall 2001)

Frequently Asked Questions

[Home] [Schedule & Readings] [Exams & Grading] [Assignments] [Slides & Examples] [FAQ] [Announcements] [Resources] [Java] [BlueJ]

This space is for questions from students.  If you ask me a question or send me one via e-mail, it may wind up here, but I will not identify you without your permission.  Questions are in reverse chronological order, so that the most recent ones are at the top and easy to find.

15 Nov 2001: How many programming questions will there be on the second midterm?  What will be the format of the midterm?
There seems to be a rumor floating around that I promised only one programming question on the midterm.  I didn't!  What I said in class was that there wouldn't be as much programming as on the first midterm and there will be more of other kinds of questions instead.  Those kinds of questions might include defining terms, explaining concepts, looking at code and giving the results or finding the errors.  I will not discuss any more details about the format of the exam.

15 Nov 2001: The Quiz and QuizQuestion classes for Assignment 6 do not have the new methods you mentioned.
Oops!  I created new versions, but linked to the old ones!  It's fixed now.

30 Oct 2001: Can I have an extension for Assignment 4?  Yes, until Friday at 2 p.m.  See announcements page for details.

14 Oct 2001: Are you providing the data sheet for the midterm or should we make up our own?
You make your own. One 8.5x11" sheet of paper with anything you want written on it, both sides.

5 Oct 2001: Can you give us some results for checking our solutions to Assignment 2?
Instead, here is a full Java program to run the recursive solution.  You can run this to check the results of your stack solution.  I'm doing this instead of giving you a list of n and f(n), because part of the assignment is deciding on a set of values that demonstrate adequately that your program works.

2 Oct 2001: For assignment 2, should we use an ArrayStack or a LinkedStack?
I didn't specify, so use either one you want.  They have the same basic functionality.

26 Sept 2001: In assignment 1, if text and weight are private to Question, how can I set them in my child class constructors?
Sorry, that was a goof in the assignment description, which I will fix.  You can either make text and weight protected instead, or add protected setText and setWeight methods.

21 Sept 2001: The arrows that BlueJ makes aren't always correct.  Sometimes it doesn't put an arrow from a child class to a parent class.
This appears to be a bug in BlueJ.  I have reported it, but haven't gotten any response yet.  Your programs will still run correctly; it's just the diagram that's wrong.

21 Sept 2001: You have pointed out in class that abstract class doesn't need a constructor.  Do you mean it's not good or it's not allowed. ( if I want to use in a subclass the constructor which take parameters and comes from base class )?
What I meant in class was that there was no reason for an abstract class to have a constructor, since you can never instantiate it.  I went and tried it and Java does actually allow you to put constructors in an abstract class.  I suppose the reason is just what you are suggesting.  That would be a nice way to share the code that sets the variables in the parent class.

17 Sept 2001: I tried your fix for the environment space problem (see below), but it doesn't work on Windows 98.  There is no Memory tab.
Here's an uglier fix that may work for you.  What you have to do is find the shortcut to the MS-DOS command prompt.  It will be under Windows, then under Start Menu.  (Unless you have your machine set up for multiple users with individual start menus -- then it will be under Windows\profiles\start menu.)  Right-click on this shortcut and click Properties.  Somewhere in this dialog (in Windows 95 it's under Program) you will see that the command line for running MS-DOS is something like C:\WINDOWS\COMMAND.COM.  Add "e:/1024" to the end of this line (with a space before the e!).  This tells the shortcut that when you start up MS-DOS you want to reserve 1024 bytes for the environment, which means DOS variables -- the blue.bat file uses a lot of these.

Now this isn't going to fix your bluej shortcut.  However, with this fix you should be able to open up an MS-DOS window, connect to your bluej installation folder, and type "bluej".  Not pretty, but at least it gets you running bluej.  I'm going to look for a nicer solution.  If anyone with running Windows 98 knows one, please let me know.

12 Sept 2001: I installed BlueJ on my computer according to your directions.  When I try to run bluej.bat, my DOS screen says "out of environment space,  Exception in thread main java.lang.NoClassDefFoundError: bluej/Main."
This problem has to do with the fact that bluej.bat sets some DOS environment variables and your computer didn't have enough memory reserved for those environment variables.  The fix I know about uses a shortcut.  (There may be a way to modify bluej.bat directly, but I don't know exactly how; I'm not a DOS expert by any means.)  Make a shortcut for bluej and then right-click on it and choose Properties.  Click the Memory tab and change "Initial Environment" to 1024.  This works for my laptop, which runs Windows 95.  The exact procedure may be different for more recent Windows.  If so, I'd appreciate an update from someone running one of thoses systems.  (14 Sept: I'm told it worked on Windows Me.)

28 Aug 2001: Do you have a 100% final option?
I'm not even waiting until the term starts to answer this one -- someone always asks.  The answer is no.  I believe assignments are too important a part of the learning process.

This page created by Margaret Lamb, Queen's University, Kingston, Ontario.  Last modified  .