Search:

Type: Posts; User: adnan.alvee

Search: Search took 0.14 seconds.

  1. Replies
    11
    Views
    191

    Re: Need help with my POP method!!!

    yeah, I can do that, but if I do that,
    char stackContent shows me error,


    char stackContent;
    stackContent = theStack.pop();

    how can i put whatever is in pop which is...
  2. Replies
    11
    Views
    191

    Re: Need help with my POP method!!!

    Aint I close? I jst need the return statement to work below, tried casting charElement into return entry since it is char type !, nope doesn't work! But the code makes sense?

    public char pop()...
  3. Replies
    11
    Views
    191

    Re: Need help with my POP method!!!

    Here is my code, all the classes are in here, you can skip stackexception and strelement(does nothing - to be deleted) classes: https://compilr.com/xemkruz/linkedstach/LinkedStack.java

    How can i...
  4. Replies
    11
    Views
    191

    Re: Need help with my POP method!!!

    This what I did, it says incomaptible data types, the real questions is how do I convert? I do have a getCopy method in my char element class. So far thw wrong code is below,


    public char pop()...
  5. Replies
    11
    Views
    191

    Re: Need help with my POP method!!!

    should the code save what is returned by the pop() method?
    Yes, it should save whatever its taking off, at least that is what I'm guessing because see on my tester below, I want to store whatever it...
  6. Replies
    11
    Views
    191

    Need help with my POP method!!!

    I have LinkedStack class, what I simply want to do is make a delimiter match alogorithm, I also have the working algorithm for it but the problem is implementing the algorithm . I'm just stuck in my...
  7. Re: Cannot print boolean value from class!

    Norm my professor says to
    Display the object by invoking its toString method.

    How do I do that? I just displayed it using print statement but how do I do it with toString?
  8. Re: Cannot print boolean value from class!

    Some one help please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  9. Re: Cannot print boolean value from class!

    Here is the full error message in Bold

    Public method isOn cannot be applied to given types;
    required: boolean
    found: no arguements
    reason: actual and formal arguement lists differ in length
  10. Cannot print boolean value from class!

    This is my assignment
    Write a class named Fan to model fans. The properties are speed, on, radius, and color. You need to provide the accessor methods for the properties, and the toString method...
  11. Re: Problem in Class, Displaying only one last change in value!

    Thank you soo much norm! That solved it. So static sets it to only one value change or more like the recent change in any object in other classes, right?
  12. Problem in Class, Displaying only one last change in value!

    Okay so I have a rectangle class having the default values for the rectangle'd height, width and color and area. Everything is working fine when I test them in my Test Class except the color....
  13. Re: Error: Main method not found! Please help!

    Sorry I am not getting you here. Did you find an error in my code? I have no idea what I should change in my code!
  14. Re: Error: Main method not found! Please help!

    Got it, its the same value 1.0. Tried with different initial values in height and width, findarea is good but my test class is not giving me the values I assigned in that class; all what I am getting...
  15. Re: Error: Main method not found! Please help!

    Tried this code System.out.println(findArea); error comes up saying "Cannot find symbol"
  16. Re: Error: Main method not found! Please help!

    Okay, this is my rectangle.java file code,


    public class Rectangle {
    private double width = 1;
    private double height = 1;
    private static String color = "white";

    public...
  17. Re: Error: Main method not found! Please help!

    Thanks, I know. Will change that.

    Got hold of the error, I was creating two classes in 1 file, separated the Test class. But I cannot dsiplay color and area. Output is 1.0 and 1.0 in the first two...
  18. Error: Main method not found! Please help!

    My Assignment: Write a class named Rectangle to represent rectangles. The data fields are width, height, and color. Use double for width and height, and String for color. Suppose that all the...
  19. Re: Help me with my 1st Java Assignment! Stuck!!

    I'm really confused, thought of using substring since it is mentioned in the chapter 1, but I dont know how
    this is what i got


    public class TextCHange {

    public static void main(String[]...
  20. Re: Help me with my 1st Java Assignment! Stuck!!

    I'm really confused, thought of using substring since it is mentioned in the chapter 1, but I dont know how
    this is what i got


    public class TextCHange {

    public static void...
  21. Help me with my 1st Java Assignment! Stuck!!

    My first assignment is from Savitch's book "Absolute Java". Here is the problem:

    Q: Write a program that starts with a line of text and then outputs that line of text with the first occurence of...
  22. Replies
    1
    Views
    567

    JAVA Guessing Game Problem

    Hi! I've been given a guessing game to make on some already written codes by my advisor but I'm really stuck.
    This what I was told to do and couldn't solve!
    --In this guessing game, the user...
Results 1 to 22 of 22