Search:

Type: Posts; User: ziplague

Page 1 of 2 1 2

Search: Search took 1.09 seconds.

  1. Replies
    18
    Views
    1,398

    Re: Dijkstra's code help

    By the way, you can make the code more readable by inserting it between "highlight=java" & "/highlight" , it will make it more colorful :) just use brackets instead of the (").
  2. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    This is the end of this thread, due to deadlines and exams coming soon, i have to submit my Java project for grading.
    I want to thank everyone who helped me improve my code and solve problems :)...
  3. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    I fixed the out of bounds exception.
  4. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    By the way, about the error that i'm getting: it only occurs with certain indexes, usually with the ones at the end of the array (last index), if i add 3 books, index 2 and 1 work fine, which...
  5. Replies
    22
    Views
    9,749

    [SOLVED] Re: Unexpected Error

    My bad, i uploaded the wrong version by mistake, here is the up to date version: 1121

    About the right placement of the methods, you're right, i thought about that. I will move them to the book...
  6. Replies
    22
    Views
    9,749

    [SOLVED] Unexpected Error

    I updated my code and everything seems to be working fine with minor duplicates which i'm going to address tomorrow, but i keep getting this error:

    Exception in thread "main"...
  7. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    My lecturer told me that i can use someone else's code on three conditions:
    1- i must understand the code, how it works etc...
    2- it should constitute less than a third of my code, meaning that it...
  8. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    @Tjstretch: Wow, cool, thank you for the fix :)
  9. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    I just finished re-factoring the code into 6 different Classes, i can see the advantages now :) and i managed to use the Console class (it simplified lots of steps). I still have some minor bugs that...
  10. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    I played around with the Console methods, all of them work great, as intended, apart from the readString() methods. If i press enter without writing anything, it prints the error prompt but then...
  11. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    I have read the article and the code, some of it is a little hard to understand because i'm not used to using parameters in methods yet. How can i use the methods in class Console in class Book? ...
  12. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    Alright, i'm reading the article right now, and i will address this issue today, thanks.
  13. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    About the "if" choice statements, i'm familiarizing myself with the switch statement that was suggested, i never used it before. i can already see how it could reduce the code considerably, i just...
  14. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    Thanks for pointing that out, i was planning on separating the parts at the end, it's just that i had lots of "static/non-static accessing methods and instances" problems at first so i just accepted...
  15. Replies
    22
    Views
    9,749

    [SOLVED] Re: Simple Library Program / Need feedback.

    "How are you dealing with invalid user input? The first thing your lecturer is going to do is to break your code by trying to put something invalid as a menu choice."
    i know :) i broke it myself, i...
  16. Replies
    22
    Views
    9,749

    [SOLVED] Simple Library Program / Need feedback.

    Hi everyone.
    I have a java programming project, a simple library system:
    User has to add books, borrow books, remove books, return books, clear library and exit the library.
    This is University...
  17. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    Anyway, thanks for your time and effort. I'm going to stick with my first version which worked the way i intended, since i'm not doing any GUI anytime soon (i know nothing about GUIs yet) and i have...
  18. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    well, before that i put it in the PersonTest class and you told me to move it to "before the constructor", the constructor is in the Person class, so there it went.
  19. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    When i do that i get an error :

    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    Syntax error on token(s), misplaced construct(s)
    Syntax error on token ""\n>Type...
  20. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    you say Get the values, how? i need to have i/o somewhere to get the values. Where should i put the i/o?

    here's what i did:


    import java.util.Scanner;

    public class Person {

    String name;
  21. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    I'm sorry, i don't seem to understand what data you're talking about specifically. There is a lot of different data inside the class and inside the constructor. You're saying to put it outside the...
  22. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    What do you mean by outside the person constructor, and what data do you mean?
    What's the problem with having an Person object half built, what if a person doesn't have a personal number, in this...
  23. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    Anyway, i will fix that. But my main concern is to try to improve the code, i feel as if i deviated from the assignment instructions. Especially concerning the instance variables and the creation of...
  24. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    oops. Yes, cmd uses version 1.6, but why? i have both installed and the paths and classpaths are correct.
  25. Replies
    16
    Views
    1,185

    Re: How can i improve this code?

    This is the error i get if i compile the PersonTest.java with both of the files seperate but in one folder (package javaLabs_4):...
Results 1 to 25 of 34
Page 1 of 2 1 2