Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECS 36B

Fall 2022

Homework #1 & #2 Additional Information

For HW #1

(1) There is no limit on the number of guesses.

(2) The simplest strategy is to open the “lists/SOLUTION.TXT” file and to try every possibilities.

(3) Your program needs to be developed under either Linux/WSL or MacOS. No Window development environment (except using WSL).

(4) As a C programmer, when you “fopen” the file, you need to know how to handle the “new line” symbol at the end of each line (and each 5-characters string). Also, the Wordle.c program already open the file such as fpSol and if you use the same file handle, your program will likely interfere with each other. The cleaner way is to “fopen” another file handle (e.g., fpSol2) on the same file (because it should be open as “r”, read-only).

(5) If you are using MacOS, you should use lldb instead of gdb.

(6) Grading – a correct Makefile, which means that it will compile and build your executable with the command “make” (and no syntax and linking errors), 2%. A program will run but cannot win all the time, 3%. A program will always win (with a reasonable amount of time, say no more than 3 minutes), 3% (i.e., the full credits). Gdb or lldb script recording, 1% bonus. 

For HW #2

(1) You need to find a partner for this homework. If you cannot find a partner, please let the instructor and TAs know. The purpose of requiring this is to help to form the final project team, which will have 3-4 students per project.

(2) You need to have at least the following classes: Person, Thing, Time (for representing Chronicle relationship among Records), Location (such as GPS or any location tag), and Record (consists of Person, Thing, Time, and Location).

(3) This homework doesn’t require you to represent all the linguistics/semantics information about the original sentences. For example, verbs like “wore” or “gave” will not need to be represented in the Record. The required components are only Person(s), Thing(s), Time, and Location.

(4) For each of the classes, you MUST define and implement the virtual member function Json::Value dump2JSON(). And, some of them might need to call the Json::Value dump2JSON() for another class. For example, the Record dump2JSON() will call the dump2JSON() in Person, Thing, Time, and Location. You will be deducted 1% if you duplicate the code, instead of calling the dump2JSON() in another class.

(5)  One major issue in this homework assignment is to install the json-cpp library, and your Makefile might need to be adjust to include and to link the right library. The TAs will also adjust your Makefile when running your submissions.

(6) Grading – a correct Makefile, 2%. Having dump2JSON(), the virtual member function, for every class, 1%. Not having duplicate code in dump2JSON(), 1% (as specified in (4)). Each Record instance, 1%.

(7) Links to JSONcpp installation –

https://formulae.brew.sh/formula/jsoncpp

(for some arm64 machines, such as newer model of MacOS, you might need to use the following)

https://github.com/open-source-parsers/jsoncpp