User Tools

Site Tools


Programming FAQ

This page contains the most frequently asked questions which were asked by students.


  • Q: Peach indicates my submission is “New” and I don't see any results, what should I do?
    A: You did not finish your submission, open it and click on submit.
  • Q: What should I do if I think I can't make the deadline?
    A: Mail as soon as possible with your current status and problem.
  • Q: What should I if my submission failed at the last moment?
    A: Mail as soon as possible with your files and problem.
  • Q: What should I do if the assignment and Peach conflict with each other?
    A: If the assignment not clearly specifies the expected behavior, Peach determines the correct behavior. If the assignment clearly conflicts with the Peach output, contact us as soon as possible such that we can give some clarification.
  • Q: Is the Peach deadline always on sunday evening?
    A: Yes. If not, contact us.
  • Q: After I've submitted my program I get a message that my submission is saved. However if I open the assignment at the homepage of Peach I see that I have made no submission.
    A: Your submission was probably successful, this is a Peach bug that has been reported. Try completely refreshing the homepage (ctrl+F5 or multiple times F5).
  • Q: Is it allowed to use the Netbeans GUI editor?
    A: You may not use the generated code for the homework assignments, but you may use it during the exam.


  • Q: Is the input splitted by spaces or newlines?
    A: Both should be accepted, use the built-in scanner which solves this problem for you.
  • Q: Should I accept more than one rectangle in a single run?
    A: No, only one rectangle has to be accepted.


  • Q: How can I skip the “init_start” keyword?
    A: Call to skip the current element.
  • Q: How many dimensions do my arrays need?
    A: You can solve this problem by only using 2 one-dimensional arrays.


  • Q: Is it compulsory to use functions?
    A: Yes.
  • Q: What is the difference between functions and methods?
    A: The big difference is that functions return something, so one or more return statements are needed.
  • Q: How can I use functions?
    A: Like in mathematics, you can use them inside formulas. e.g. you can write x = 3*myFunction(y) if you have defined myFunction with 1 argument. The number of arguments should correspond to the number of arguments you wrote in your function definition.


  • Q: Where should I create the classes I need?
    A: Each class should be created in its own file with the same filename as the classname.
  • Q: Where should I create the main method?
    A: In Bank.
  • Q: Where should I create the compulsory methods?
    A: In Bank.
  • Q: How should I split the functionality between Bank and Account?
    A: Methods in Account should only do something with that account. Bank should call these methods for the appropriate account(s).
  • Q: How can I call methods of an Account?
    A: If you have an Account instance (created with “new Account”) named a, you can write “a.myMethod(…)” to call the method of that account.
  • Q: Which format has the interest percentage?
    A: It is a double with a percentage between 0% and 100% (or more). (Not a double between 0 and 1.) Make sure your solution complies with Peach.
  • Q: Do I need to use the scanner?
    A: No, you just need to create the appropriate functions and methods.
  • Q: What to do if my compiler complains about mixing long and int variables in the interest function?
    A: If you want to convert a long to an int, cast it using “(int)”. e.g. Write “x = (int)y” where x is an int and y is a long variable.
    Background information: A long can contain larger values than an int, so it could be too large to store it in an int variable. If you know it will fit because your input is small enough, you can tell the compiler to convert it to an int under the assumption it fits.

Mouse Monitor

  • Q: Why is my label not showing the increased count?
    A: You should manually refresh the label by setting the text (again).
  • Q: Should I only consider the left mouse button actions?
    A: Yes. Not compulsory.
  • Q: How should I count mouse drags?
    A: Press-Move-Release should only increase press and release count. Clicking in one spot should increase all three. (This is already done by the MouseListener class.)
  • Q: Why is Border not imported by “import javax.swing.*;”?
    A: The star notation only imports direct children of the element, not sub-elements.
  • Q: Should I do something with the Entered and Exited methods?
    A: No. More specifically, it is not needed to implement the requested functionality.
2012/faq.txt · Last modified: 2013/05/02 12:47 (external edit)