Results 1 to 2 of 2
Thread: BlueJ : reviewmaker
- 02-28-2013, 09:49 PM #1
Member
- Join Date
- Feb 2013
- Posts
- 1
- Rep Power
- 0
BlueJ : reviewmaker
EDIT: This is maybe better. I need to make an review and the review got 2 important parameters, judgement and the name. I need to make it when I give the name, they will give me all the reviews that belong to that name. Also, i need to know what name got the most reviews.
Hey everyone, I'm searching for a way to make a review maker. It's for school and this is the formulation of the question (beware, it's roughly translated):
It's a about a website about giving reviews for a restaurant.
Users of a site pass on reviews. They give the next information:
- Name of the restaurant
- Place
- Price class (5-20 euro, 20-50 euro or above 50 euro)
- a judgement from 1-10
It is for sure a certain restaurant can have different reviews. You can choose if you want to save all the reviews in a ArrayList<Integer> , or you just can save them all the way you want. As long as you can request all the reviews from a restaurant.
The point is, you need to keep the basic data and make a list of all restaurants and there reviews.
You need to fix all these questions:
-Given the name of a restaurant and a city array list with reviews
for that restaurant. If there are no reviews for that restaurant, you may give an empty array list back.
- the amount of reviews on the site
- The restaurant with the most reviews
Now i can make a review, but i can't fix the questions. Any help would be appriciated. It's written in BlueJ and i will give what i already have.
public class Reviews
{
private String naam;
private String stad;
private double uitgegeven;
private double beoordeling;
private String prijsklasse;
/**
* @param naam Naam van het restaurant
*
* @param stad Plaats van het restaurant
*
* @param uitgegeven Het aantal geld uitgegeven aan je bezoek
*
* @param beoordeling Een score tussen 1-10 dat de kwaliteit van het restaurant aangeeft
*
* @param prijsklasse Prijsklasse waar het restaurant inzit
*
*/
public Reviews (String naam, String stad, double uitgegeven, double beoordeling ) {
this.naam = naam;
this.stad = stad;
this.uitgegeven = uitgegeven;
if (uitgegeven < 20) {
prijsklasse = "5 tot 20";
}
else if (uitgegeven > 50) {
prijsklasse = "meer als 50";
}
else {
prijsklasse = "20 tot 50";
}
this.beoordeling = beoordeling;
}
//getters
public String getNaam(){
return naam;
}
public String getStad(){
return stad;
}
public String getPrijsklasse(){
return prijsklasse;
}
public double getBeoordeling(){
return beoordeling;
}
}Last edited by SamNotTheMan; 02-28-2013 at 10:02 PM.
- 03-01-2013, 02:54 PM #2
Re: BlueJ : reviewmaker
Why do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
BlueJ IDE
By jcbmack in forum New To JavaReplies: 9Last Post: 08-08-2012, 07:26 AM -
bluej help
By fatooma92 in forum New To JavaReplies: 3Last Post: 03-06-2012, 03:36 PM -
bluej help
By xpanhol in forum Java AppletsReplies: 4Last Post: 01-29-2012, 12:46 AM -
BlueJ - UML
By Nghi97 in forum New To JavaReplies: 5Last Post: 11-28-2011, 11:03 AM -
BlueJ 2.2.0
By JavaBean in forum Java SoftwareReplies: 0Last Post: 07-07-2007, 02:28 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks