CSC 257 Online
CSC 257 Class Discussion

20080618 Wednesday June 18, 2008
Final Exam Review

Your final exam is scheduled for Monday, June 23 from 6:00 - 9:00 pm in room 1010 in building EB1.

The final exam is open-book, open-notes. There are 12 multi-part questions. The total number of points on the exam is 110, so there are effectively 10 points for extra credit.

I have broken down the exam questions into very rough categories as follows.

  • 14 points: General questions about Java, fundamentals.
  • 18 points: General questions about classes, constructors, etc.
  • 13 points: Naming, aliasing, and parameters.
  • 8 points: Static members.
  • 21 points: Inheritance and interfaces.
  • 9 points: Aggregates and collections
  • 15 points: Exceptions
  • 12 points: GUIs

A few of the questions are true/false.

Some of the questions are short answer. An example of such a question is:
Suppose A.java is Java source code with no syntax errors. What is the name of the class file generated when A.java is compiled?

You must write some code, make corrections in some code, and analyze much code. An example of a coding question is:
Define a class named C with two characteristics: 1) C is a child of a class named B (which has a single constructor with a String parameter); and 2) C has a constructor that calls B's constructor with the string "Hello".

An example of an analysis question is:
In the previous question, suppose the constructor for C had not called the constructor for B. What would have been the result and why?

Here are the ground rules:

  1. The exam lasts 3 hours.
  2. The exam is open books, open notes. You may bring any printed resource materials that you wish.
  3. Laptop computers are not allowed.
  4. You may bring calculators (not helpful but allowed), cell phones, ipods, PDAs, or similar devices.
  5. You will need your own paper to write on.
Posted by jctetter ( Jun 18 2008, 08:43:01 AM EDT ) Permalink Comments [0]
20080614 Saturday June 14, 2008
Exercise 11 Problem 1 For problem 1, I used:
sum += (Integer)i.next();

Instead of the statement given by the answer key:
sum += ((Integer)i.next()).intValue();

The same goes for the removeSet() method, also.  I got the same answer either way for both methods.  Is there a reason to use intValue();?  Or does it matter?  I use Java 5.0 if that helps.
Posted by elstuelk ( Jun 14 2008, 06:42:32 PM EDT ) Permalink Comments [1]
20080601 Sunday June 01, 2008
Project 2, more questions
Do we turn in all of the .java files, Queue.java, vehicleFactory.java, etc?

Or just our new/updated .java files, Simulator.java, Vehicle.java, Car.java, Truck.java, log.java.

If we turn them all in, do we just leave the documentation/author as Jo Perry.

Thanks,

Shawn
Posted by sdmiller ( Jun 01 2008, 03:02:44 PM EDT ) Permalink Comments [1]
20080529 Thursday May 29, 2008
Project 2
The project says that if the code is correct we will obtain the following results
Input of 1000 vehicles
Average wait time: 3.744
Average pay-process time: 3.219

Input of 10000 vehicles
Average wait time: 3.1595
Average pay-process time: 3.1423
Are we going to get exactly these results or just something similar since the vehicles are randomly generated?  I am guessing we are looking for similar results.

Thanks,

Shawn
Posted by sdmiller ( May 29 2008, 06:49:42 PM EDT ) Permalink Comments [5]
20080522 Thursday May 22, 2008
FlowLayout & Alignment

I'm having difficulty getting my GUI to layout exactly like the one in the project specs.  I can get all of the data displayed, but can't seem to grasp how to make the text and values for the Score, Cumulative, and guess status to line up top to bottom. 

I'm able to add parameters to set things as left justified and such, but can't see how to make it go from top -> down.  Am I going to completely wrong route here? 

Also, will the display matching that of the picture in the specs be part of the grading?

thx

Posted by ammcknig ( May 22 2008, 01:53:41 PM EDT ) Permalink Comments [3]
20080521 Wednesday May 21, 2008
Few Questions In Project 1, do we need to handle incorrect input into the text field, such as "abc".  Right now my program just treats it as an incorrect guess with no real feedback of 'too high' or 'too low'.  I am not sure at the moment how to deal with keeping the input as an int since I already have to parse the string to an int to begin with.

Also, I am thinking of using the bottom output field that normally displays "<number> is too high" to use as an information field for when the user tries to submit before pressing new game it will say "Please press new game to start".  Also if a number falls outside of the 1-100 it will display "invalid entry".
 
Would this be acceptable or should be display some sort of messagebox popup instead?

Any Help is appreciated!

Shawn
Posted by sdmiller ( May 21 2008, 07:41:30 AM EDT ) Permalink Comments [1]
20080519 Monday May 19, 2008
Problem compiling When trying to compile HelloWorld.java, I get:
Error occurred during initialization of VM
Could not reserve enough space for code cache

I am logging into remote.eos.ncsu.edu, which is the FAQ solution to the problem.
Posted by mhnash ( May 19 2008, 10:52:06 AM EDT ) Permalink Comments [3]
20080518 Sunday May 18, 2008
Welcome Welcome to CSC 257, Introduction to Java (for C++ programmers). This course officially begins on Monday, May 19.

The purpose of this blog is to provide class discussion. In order to post a blog entry, you must:
  1. Register with the NCSU libraries as a blogger.
  2. Email me (jctetter@ncsu.edu) to request permission to be a blog author -- be sure to tell us your unity ID in the email. Author posts are always identified by Unity ID.
If you want to post an entry without revealing your Unity ID, you can email the entry to me and I'll post it for you.

We'll be sending out email during the first week of classes with more information. T
he course website is currently available to registered students:

    http://courses.ncsu.edu/csc257/lec/651/
Posted by jctetter ( May 18 2008, 03:37:13 PM EDT ) Permalink Comments [0]

Archives
Language
Links