add solution of HW4
This commit is contained in:
31
hws/yelp_businesses/Business.h
Normal file
31
hws/yelp_businesses/Business.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef BUSINESS_H
|
||||
#define BUSINESS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
class Business {
|
||||
public:
|
||||
//constructs a Business by parsing a JSON-formatted line
|
||||
Business(const std::string &jsonLine);
|
||||
//Accessors
|
||||
std::string getName() const;
|
||||
std::string getCategories() const;
|
||||
double getRating() const;
|
||||
int getPrice() const;
|
||||
int getReviewCount() const;
|
||||
std::string getCity() const;
|
||||
std::string getPostalCode() const;
|
||||
//returns a string representation of the star rating
|
||||
std::string getStarString() const;
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
std::string categories;
|
||||
double rating;
|
||||
int price;
|
||||
int review_count;
|
||||
std::string city;
|
||||
std::string postal_code;
|
||||
};
|
||||
|
||||
#endif // BUSINESS_H
|
||||
Reference in New Issue
Block a user