adding cp3

This commit is contained in:
Jidong Xiao
2024-01-07 23:51:42 -05:00
parent a19aa83b0a
commit 19816403d3
3 changed files with 37 additions and 8 deletions

View File

@@ -102,7 +102,7 @@ Now let's write a brand new C++ program to learn about command line
arguments. First open up a brand new file named `silly.cpp`. arguments. First open up a brand new file named `silly.cpp`.
Include <iostream> at the top of the file. Include <iostream> at the top of the file.
Read this [Programming Information](https://www.cs.rpi.edu/academics/courses/fall23/csci1200/programming_information.php) explaining command line arguments in C++. You may also want to refer to 1.13 of the lecture notes for array syntax. Read this [Programming Information](https://www.cs.rpi.edu/academics/courses/fall23/csci1200/programming_information.php) explaining command line arguments in C++. You may also want to refer to the lecture notes for array syntax.
- To start, let's write a program that expects only integers on the - To start, let's write a program that expects only integers on the
command line, and it will print the product (multiplication) of those command line, and it will print the product (multiplication) of those
@@ -138,16 +138,15 @@ product of integers: -600
### To complete Checkpoint 2: ### To complete Checkpoint 2:
Show a TA or mentor your program. Be ready to demonstrate that your program works with other input requested by the TA or mentor. Show a TA or mentor your program. Be ready to demonstrate that your program works with other input requested by the TA or mentor.
## Checkpoint 3 ## Checkpoint 3: File IO
*estimate: 45 minutes* *estimate: 45 minutes*
For the remainder of the lab time, work on the Crash Course in C++ In lecture we talked about how to use the STL file stream library fstream to read data from a file and/or write the output to a file. Let's do some exercises.
Exercises. Discuss the exercises with your lab study group classmates and ask
your TA and mentors lots of questions!
### To complete Checkpoint 3 (and the entire lab): Write a C++ program which reads this [json file](users.json), and print all user names into an output file called output.txt. Your output file must be the same as this [sample output file](sample_output.txt).
About 10 minutes before the end of lab the TA and mentors will make a final visit to each study group and check you off. Please be ready to quickly update them
on your progress. ### To complete Checkpoint 3:
Show a TA or mentor your program. Your program must produce the right output and you must be able to explain your program.
## SPECIAL NOTE FOR FIRST WEEK OF CLASSES ## SPECIAL NOTE FOR FIRST WEEK OF CLASSES

View File

@@ -0,0 +1,15 @@
taylorswift
jenniferaniston
nbcsnl
easymoneysniper
agt
justinbieber
jaytatum0
andrewyang
nicolekidman
chelseafc
lakers
carrieunderwood
cnn
cmpulisic
andersoncooper

View File

@@ -0,0 +1,15 @@
{"id": "11830955", "username": "taylorswift", "url": "https://www.instagram.com/taylorswift", "fullName": "Taylor Swift", "biography": "Im the problem, its me", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "true", "comments": "true", "newFollowers": "true", "messageRequests": "true"}]}
{"id": "21388754496", "username": "jenniferaniston", "url": "https://www.instagram.com/jenniferaniston", "fullName": "Jennifer Aniston", "biography": "My friends call me Jen.\nFounder, @lolavie.", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "true", "comments": "true", "newFollowers": "true", "messageRequests": "true"}]}
{"id": "218738123", "username": "nbcsnl", "url": "https://www.instagram.com/nbcsnl", "fullName": "Saturday Night Live", "biography": "The official Instagram of Saturday Night Live.\nWatch on @nbc and @peacock. Streaming next day on Peacock.", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "true", "comments": "true", "newFollowers": "false", "messageRequests": "false"}]}
{"id": "13864937", "username": "easymoneysniper", "url": "https://www.instagram.com/easymoneysniper", "fullName": "", "biography": "", "notifications": [{"pauseAll": "false", "likes": "false", "tags": "false", "comments": "false", "newFollowers": "false", "messageRequests": "false"}]}
{"id": "255788740", "username": "agt", "url": "https://www.instagram.com/agt", "fullName": "America's Got Talent - AGT", "biography": "Two minutes can change your life. #AGT: Fantasy League premieres Monday, January 1 on @nbc and streaming on @peacock.", "notifications": [{"pauseAll": "true", "likes": "true", "tags": "true", "comments": "true", "newFollowers": "true", "messageRequests": "true"}]}
{"id": "6860189", "username": "justinbieber", "url": "https://www.instagram.com/justinbieber", "fullName": "Justin Bieber", "biography": "JUSTICE the album out now\n@drewhouse", "notifications": [{"pauseAll": "false", "likes": "false", "tags": "true", "comments": "true", "newFollowers": "true", "messageRequests": "true"}]}
{"id": "41157727", "username": "jaytatum0", "url": "https://www.instagram.com/jaytatum0", "fullName": "Jayson Tatum🙏🏀", "biography": "In Jesus Name I Play 🙏\nOh yeah I'm from the LOU\n@enjoysmallwins", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "false", "comments": "false", "newFollowers": "true", "messageRequests": "true"}]}
{"id": "3969496290", "username": "andrewyang", "url": "https://www.instagram.com/andrewyang", "fullName": "Andrew Yang", "biography": "Entrepreneur, Dad, Champion of a Human-Centered Economy, <202a>#YangGang<202c>, <202a>#Forwardist<202c>, UBI, Founder of Forward Party, NYT bestselling author", "notifications": [{"pauseAll": "false", "likes": "false", "tags": "true", "comments": "true", "newFollowers": "true", "messageRequests": "false"}]}
{"id": "1637269350", "username": "nicolekidman", "url": "https://www.instagram.com/nicolekidman", "fullName": "Nicole Kidman", "biography": "@BlossomFilms", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "true", "comments": "true", "newFollowers": "false", "messageRequests": "false"}]}
{"id": "244309106", "username": "chelseafc", "url": "https://www.instagram.com/chelseafc", "fullName": "Chelsea FC", "biography": "", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "true", "comments": "true", "newFollowers": "true", "messageRequests": "false"}]}
{"id": "16917874", "username": "lakers", "url": "https://www.instagram.com/lakers", "fullName": "Los Angeles Lakers", "biography": "Welcome to the #LakeShow\n🏆 17x Champions\nWant more? @LakersScene & @loslakers", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "true", "comments": "false", "newFollowers": "false", "messageRequests": "true"}]}
{"id": "306227985", "username": "carrieunderwood", "url": "https://www.instagram.com/carrieunderwood", "fullName": "Carrie Underwood", "biography": "Official Carrie Underwood Instagram", "notifications": [{"pauseAll": "false", "likes": "false", "tags": "false", "comments": "true", "newFollowers": "true", "messageRequests": "true"}]}
{"id": "217723373", "username": "cnn", "url": "https://www.instagram.com/cnn", "fullName": "CNN", "biography": "Asking the hard questions and bringing unique perspective from across the globe. This is CNN.", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "false", "comments": "true", "newFollowers": "false", "messageRequests": "true"}]}
{"id": "292388190", "username": "cmpulisic", "url": "https://www.instagram.com/cmpulisic", "fullName": "Christian Pulisic", "biography": "USA & AC Milan 🇺 🇸 ⚽️", "notifications": [{"pauseAll": "false", "likes": "true", "tags": "false", "comments": "false", "newFollowers": "false", "messageRequests": "true"}]}
{"id": "3071167", "username": "andersoncooper", "url": "https://www.instagram.com/andersoncooper", "fullName": "Anderson Cooper", "biography": "Season 2 of ALL THERE IS, my podcast about grief and loss, starts November 29th.", "notifications": [{"pauseAll": "true", "likes": "false", "tags": "true", "comments": "true", "newFollowers": "true", "messageRequests": "true"}]}