Search:

Type: Posts; User: misterCrypto

Page 1 of 2 1 2

Search: Search took 0.37 seconds.

  1. Re: Display histogram using values from Array, use asterisks in histogram not numerals

    Hey, thanks for the stackoverflow link, I've looked at that site quite a bit, and honestly, I don't really understand what I'm reading. I tried using



    for (int j = 0; j < rentalCounts[i] - 1;...
  2. Display histogram using values from Array, use asterisks in histogram not numerals

    Currently I'm trying to create a histogram that displays asterisks instead of the numeral. My project is two classes, one for data, and one for display. I feel like I have 90% of this project done...
  3. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    It does for the most part. The only issue that I have with it is, if the user searches for apps rated 0, it will return the unrated apps. But, if you search for apps with rating above 4, it returns...
  4. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Somehow I managed to figure this out...took all night, but it works. Now my problem is if the rating searched is 0. I want it to just error message, not iterate anything. There are no 0 ratings...
  5. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    So, I've been trying two different ways to achieve this answer, so far, no luck. We'll see what you say. Since the parameter is the value of the rating we're looking I decided to search the ratings...
  6. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Man, I guess I took your comment "It seems like the logic for this method is the same as for the getAppsByAuthor method." to literal. You didn't actually say that the method would be written the...
  7. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Yes, this was my thinking. When I was working through this today I couldn't get the rating from get.appRating() to match the given rating parameter of getNumAppsWithRating method. I will work with...
  8. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    To get the rating of an app I need to call the getRating() method. I'm pretty sure I want to use a for-each loop because I need to check each app for a rating.

    There isn't a special method that...
  9. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Sorry, I didn't include because earlier I missed curly bracket and messed your compiling up. Will include.

    /**
    *@locate apps that have been rated
    *@param represents a rating
    ...
  10. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Got it, here's what I've been working on.



    public ArrayList<App> getNumAppsWithRating(int rating)
    {
    ArrayList<App> numAppsWithRating = new ArrayList<App>();
    int count = 0;
    for(App...
  11. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Ok, no problem. This project is an AppStore that sells Apps. I have two classes, AppStore and App. Each App that is entered into the store has a String Name (name of app), String name (name of...
  12. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    I haven't been getting any error messages, it just hasn't been doing what I'm wanting it to do. Here's the code I tried originally, I've tried several things by now though.



    public...
  13. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Ultimately I came to that conclusion, but not soon enough. There's one more method that I'm really having trouble with. Are you up for helping? This is what it entails. Essentially they are asking me...
  14. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Interesting point. I see in the book a isEmpty(), while I've been looking this up I see emptyList, so I guess I just assumed that it was a function. Ok. Can you tell me if this code is right for...
  15. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    That sucks. I feel better about it now than I did an hour ago, so I'm happy for that. I fixed line 4. Not sure where the other errors are. I copied and pasted. Is there any way to upload screenshots?...
  16. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    I understand. I look for help online a lot but no one uses BlueJ so it doesn't translate the same. So, there is no main method. You are right. When you execute this code, does it run?
  17. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    The main method is the first source code that I just posted. Below that one is the App Class. When I execute the code, I click compile, then I go to another window that shows two objects AppStore and...
  18. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    I think there's a problem because when I execute that method the dialog box in BlueJ doesn't show the names of the apps by the given author. Also, I haven't been able to return an empty list.


    ...
  19. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Noooo. Only part of it. You asked me how I knew that the method found the apps, I responded. I don't know how to make it return the apps that were created by the given author, and I don't know how to...
  20. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    I know it finds them because when I search for the author name, if there are apps created by that name, a BlueJ method result box appears. It says the name of the method and the name that I searched...
  21. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Now I'm trying to Write a method called getAppsByAuthor that takes a String parameter and returns a list of apps by the given author. If there are no apps with that author, return an empty list (not...
  22. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Ok, I did String name =... because earlier you referred me to my getAppsByAuthor method and I did something similar. I thought that was correct so I tried to use it again, only changing the names. I...
  23. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    Maybe it has to do with BlueJ and BlueJ doesn't give line numbers. So, everything above that method, nothing has changed.



    public App findApp(String name)
    {
    for(App app : appList) {
    ...
  24. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    It says Incompatible Types : String cannot be converted to App.
  25. Replies
    61
    Views
    1,768

    Re: ArrayList String searches and loops

    I understand, completely. When I tried



    if(app.getName().equals(name)) {


    I couldn't get the method to return the name. I keep getting error messages of incompatible types, can't convert...
Results 1 to 25 of 40
Page 1 of 2 1 2