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;...
Type: Posts; User: misterCrypto
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;...
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...
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...
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...
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...
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...
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...
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...
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
...
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...
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...
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...
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...
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...
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?...
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?
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...
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.
...
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...
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...
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...
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...
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) {
...
It says Incompatible Types : String cannot be converted to App.
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...