Search:

Type: Posts; User: Scorks

Page 1 of 3 1 2 3

Search: Search took 0.21 seconds.

  1. Replies
    4
    Views
    222

    Re: TCP server/client simple question?

    Made the changes... Unfortunately it is still not working.
  2. Replies
    4
    Views
    222

    TCP server/client simple question?

    I'm trying to figure out why my server will not print to my client when I run my java classes within the terminal. The client will correctly send information to the server, the server does it's work,...
  3. Replies
    2
    Views
    119

    Re: Reader Clarification?

    That's very helpful.

    Thanks.
  4. Replies
    2
    Views
    119

    Reader Clarification?

    Hello everyone,

    I've created a class that extends FilterReader, that is to be used to find certain sequences of letters. I plan on using this code to demonstrate an observer, observable design...
  5. Replies
    2
    Views
    461

    Converting an int to Double

    So I have a collection of type X, and I'm iterating through it trying to find a situtation where X is an integer, and if so, converting it to Double and adding it to another collection. The problem...
  6. Replies
    2
    Views
    266

    What does this super( ) call do?

    For the following code:



    public class StatMaker<X> implements Iterable<Double> {
    Iterable<X> theValues;

    /**
    * @param theValues the Iterable being wrapped.
    */
  7. Replies
    0
    Views
    210

    Red Black trees question?

    I was wondering if there was any correlation between the size of a red-black tree, and the percentage of red nodes? Like, as n increases, what will happen to the amount of red nodes in comparison to...
  8. Replies
    2
    Views
    372

    Re: Binary Search Trees theory question?

    These answers are not in any particular order, so couldn't they ALL be binary search trees, once correctly put into a BST?
  9. Replies
    2
    Views
    372

    Binary Search Trees theory question?

    Suppose that a certain BST has keys that are integers between 1 and 10, and we search for 5. Which sequence below cannot be the sequence of keys examined?

    (a) 10,9,8,7,6,5
    (b) 4,10, 8, 6, 5 ...
  10. Replies
    1
    Views
    838

    Algorithm for card sorting

    I need to find an algorithm to sort a deck of cards with THREE rules.

    1. We can only look at the top 2 cards on the scrambled deck.
    2. We may flip the two cards around if we wish
    3. The top card...
  11. Replies
    2
    Views
    720

    [SOLVED] Re: Algorithm for permutations

    I got it pretty soon afterwards. Thanks anyways.
  12. Replies
    2
    Views
    720

    [SOLVED] Algorithm for permutations

    Consider the problem of generating all permutations of length k of a set of cardinality n, where n is a non-negative integer number and k < (or) = n is a non negative integer number.

    So far, I...
  13. Replies
    0
    Views
    269

    Time complexity problem?

    2674

    Hi all,

    I was wondering if anyone could answer a sample question from the full question here? I understand that big-OH is the worst case, little O is the best case, and Theta notation is...
  14. Replies
    7
    Views
    466

    Re: I/O stream question?

    Oh, okay! So the whole purpose for streams is just because these files can be large, and using bytes helps shorten it down. Where exactly is this information going when we use streams, though?
  15. Replies
    7
    Views
    466

    I/O stream question?

    Hey, just a basic theory question that the text isn't doing a fantastic job of explaining. I know that java I/O streams are used for reading/writing bytes, as opposed to the system.in and system.out...
  16. Re: How to make buttons in JFrame and when clicked on, do something?

    You need to create ActionListeners. Basically, these listeners will be attached to your buttons, and when they're pressed, the code provided in the listener class will be executed. For example, when...
  17. Replies
    4
    Views
    622

    Re: using ActionListeners to draw circles

    Well, x,y, and r are just the values that the user would input into the JTextFields, then upon clicking the "draw" button, I want a circle to be drawn. I just don't know how to actually invoke the...
  18. Replies
    4
    Views
    622

    using ActionListeners to draw circles

    Hey there,

    We're learning GUI, and I'm working on a program that takes the input of x, y, and radius, and draws a circle from those points.

    I'm stuck, because in my listener, I'm not sure how...
  19. Thread: Order of growth

    by Scorks
    Replies
    1
    Views
    771

    Order of growth

    Hi!

    We recently started Time complexity/order of growth in my computer science class, and we were given a table with a number of different order of growth definitions ((O)N^2, O(N^3), O(N!),...
  20. Replies
    1
    Views
    1,039

    exponent recursion

    The question is:

    The following method was known to the ancient Greeks for computing square roots. Given a value x > 0 and a guess g for the square root, a better guess is (x + g/x) / 2 (g + x/g) /...
  21. Replies
    3
    Views
    437

    Re: Exiting array loop

    I'll try that, thanks!
  22. Thread: Arrays?

    by Scorks
    Replies
    4
    Views
    600

    Re: Arrays?

    Thanks! That cleared it up. My code is getting incredibly convoluted though, and I'd rather have everything separated into their own classes. The question is:
    Airline seating. Write a program that...
  23. Thread: Arrays?

    by Scorks
    Replies
    4
    Views
    600

    Arrays?

    I have the code:




    public class main {

    public static void main(String[] args) {

    //ARRAY for first class
  24. Replies
    3
    Views
    437

    Exiting array loop

    Hey there!

    I'm working on specific method (reserve a plane seat), and I have created a 2D array to represent the seats. here is the method so far to reserve a seat in economy class:


    public...
  25. Replies
    1
    Views
    582

    boolean arraylists?

    Hey there!

    I'm working on an airline reservation system, and have decided to use boolean 2D arraylists to store my seating information. There is first and second class, but I have forgotten how to...
Results 1 to 25 of 62
Page 1 of 3 1 2 3