Skip to content

onClickFindBeer#2

Open
AndrealHarrison wants to merge 1 commit intoMobileApps-Cascadia:mainfrom
AndrealHarrison:main
Open

onClickFindBeer#2
AndrealHarrison wants to merge 1 commit intoMobileApps-Cascadia:mainfrom
AndrealHarrison:main

Conversation

@AndrealHarrison
Copy link

No description provided.

Copy link
Contributor

@Bansenauer-Cascadia Bansenauer-Cascadia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BeerExpert model still needs some additional refactoring work to make it complete



String getRecommendation(String color) {
static String getRecommendation(String color) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making this static, refactor the method to use a new "mColor" instance variable

String beerType = String.valueOf(colorSpinnerView.getSelectedItem());

//TODO: WRITE code to get recommendations from the BeerExpert class
String beerBrand = BeerExpert.getRecommendation(beerType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you use the model, be sure to use the reference variable, rather than the class name, e.g., use expert.getRecommendation() instead of BeerExpert.getRecommendation()


//TODO: MODIFY code to display the brands instead of the beerType using the BeerExpert class
brandsListView.setText(beerType);
brandsListView.setText(beerBrand);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants