From acfb30d1a60b0e19aec2597a5ecd976fb057dda9 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Thu, 8 Feb 2024 23:30:23 -0500 Subject: [PATCH] adding hw4 discussion questions --- hws/discussions/yelp_businesses.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 hws/discussions/yelp_businesses.txt diff --git a/hws/discussions/yelp_businesses.txt b/hws/discussions/yelp_businesses.txt new file mode 100644 index 0000000..3fb7b78 --- /dev/null +++ b/hws/discussions/yelp_businesses.txt @@ -0,0 +1,12 @@ +In-class discussion + +Discuss the following questions with students around you. + +1. The last command line argument (i.e., categories) may contain one or more words, how does our program know how many words are provided in the categories argument? + +2. In our program, how do we determine if a business falls into the chosen categories or not? +3. Is it necessary to store every field of each line into some data structure or some class object? +4. Is it neceesary to check the categories field of every line? + +5. Do we need call a sort function? The std::list container does have a sort member function. +6. Do we need to implement a destructor for the class we write? Is heap memory a good choice to store the linked list?