Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

PIC 10A

Introduction to Programming

Weiqi Chu
UCLA Mathematics

1
Class format
• The class will be given in a fully in-person format:
– In-person: lectures, discussions, and exams
– Online homework assignment via Gradescope
– Lectures and discussion sessions are not recorded
• In-person office hours: TBA on Canvas
• Covid-related regulations: https://covid-
19.ucla.edu/ucla-return-to-campus/

2
Textbook
• Big C++: Late Objects, 3rd Edition by Cay S.
Horstmann
• Cover Chapter 1-9
• Reading references:
– Big C++ 2nd Edition
– C++ Primer 5th Edition

3
With In-person Exams
Scheme I Scheme II
Homework 50% 50%
Participation 1% 1%
Midterm Exam 13% 0%
Final Exam 36% 49%

• Participation: students who complete MyUCLA


course evaluation surveys will receive full credits of
participation
• No credits for attendance
4
Homework
• There will be 8 homework assignments in total. The
lowest score will be dropped.
• The homework will be posted on Canvas.
• You will need to submit homework on Gradescope.
Other submission methods will not be accepted,
such as emails.
• Homework is due 5pm Friday. HW1 is due Week 3.
• Emails about late submission and homework
extensions will not warrant a reply.

5
Exams
• Midterm exam
– Time: 10-10:45am Friday of Week 6 (May 6th)
• Final exam
– Time: 11:30am to 2:30pm on June 6th
• Both exams are in-person closed-book.
• No make-ups for exams. You must take the final
exam to pass.

6
Compilers and OSs
• Install a C++ compiler on your own computer
– Windows users: Visual Studio 2022 community
– Mac users: Xcode (any version)
• Online HTML compiler (only for simple code)
– https://www.onlinegdb.com/
• A side note for Mac users: “Visual Studio Code” or
“Visual Studio for Mac” do not work for this class.

7
PIC Lab
• PIC lab is located in Math Sciences Building 2000,
where you can find Windows computers equipped
with Visual Studio 2022.
• PIC Lab Hours: https://www.pic.ucla.edu
• If you already have access to Visual Studio 2022, no
need to use PIC Lab at all.
• If you don’t have access to Visual Studio 2022, you
are encouraged to work on your own computers
primarily and only use PIC lab computers to double-
check your homework before submission.
8
“Official” Compiler
• The same code may (mostly may not) result in
subtle differences when compiled with different
compilers.
• Microsoft Visual Studio 2022 is the official compiler
to grade homework and other class related
materials. Check your homework with VS2022
before submission.
• Visual Studio 2022 is not compactable with Mac or
Linux OSs.
• Visual Studio 2022 is available in computers in PIC
and UCLA libraries.

9
Enrollment note
• The only way to enroll is via MyUCLA waitlist
• All waitlist students will be manually
enrolled by Friday 5pm of Week 2.
• No PTE numbers.
• Contact the undergraduate math office
ugrad@math.ucla.edu if you have further
enrollment questions.

12
Email Etiquette
• Always include your class number in your email
subject to get promote replies.
• Contact the instructor directly if you have
questions regarding homework grades and
extensions.
• Emails about homework extension, late homework,
etc will not warrant a reply (interpret it as my way
of saying no…)

13
Discussion Section
• Discussion sections led by TAs
– Have a smaller class size, 30 students
– Have a more interactive teaching style
– Cover code demonstration, dynamic
programming, exam reviews, etc.
• Your TAs will instruct how to install a compiler and
use a compiler to run C++ code on Tuesday.
• Contact the instructor for questions about grades,
extensions and enrollment

14
Academic Integrity
• Everyone must write your own independent code
and solution.
• Using anyone else’s code is considered as cheating,
no matter where the source is.
• Academic misconduct will lead to a zero grade on the
assignment and be reported to the Dean’s office.
• Feel free to use general languages or pseudocode in
discussion, but never show or send your code to
someone else in the class.
• Read more about academic integrity on the syllabus.
15
Special Needs
• If you qualify as a special needs student please let
me know as soon as possible.
• Send me an email at the beginning of the quarter.
• We can only provide special accommodations for
exams after I receive the official letter from CAE
(https://www.cae.ucla.edu/).
• If you intend to request special needs, please register
yourself with CAE first.

16
Windows users: run C++ with VS2022
• TAs will go over how to run C++ with VS2022 on the
first discussion session.
• Tutorial videos can be found on
Ø Canvas (bruinlearn.ucla.edu)
Ø Announcement
Ø “Install C++ compilers and setup C++ project”
Ø section: “For Windows OS users, install Visual
Studio 2022 community”

17
Windows users: run C++ with VS2022
• Steps:
– Create a project in VS 2019
• New project -> Visual C++ Windows Desktop
Wizard -> Console Application -> Empty project,
no precompiled header
– Write and run a programs
• Write code -> Run code (“Start without
Debugging”)
• Each project must have one and only one main.cpp!

18
Mac users: run C++ with Xcode
• Tutorial videos can be found on
Ø Canvas (bruinlearn.ucla.edu)
Ø Announcement
Ø “Install C++ compilers and setup C++ project”
Ø section: “For Mac OS users, install Xcode (any
version)”

19
Mac users: run C++ with Xcode
• Steps:
– Launch XCode.
– In the "Choose template" box, pick Mac OS X, then
Command Line Tool. Press Next.
– Give your project a name, select C++ as the type.
– You should see a new project with main.cpp.
– Press the Run (triangle) button.
– You can see Hello, World!printed to the console
• Each project must have one and only one main.cpp!

20
Hello Word!
• For both Visual studio 2022 and Xcode, you must
create “project” first before running a C++ program.
• Each project can only contain one and only one int
main function.
• Demo videos are posted on Canvas on how to run
C++ code with VS2019.

21
To do list after class
qRead syllabus
qRead announcement posted on Canvas
qChoose the appropriate compiler for your operating
system and try to install it on your computer.
qRun C++ code with your local compiler. This requires
you to create a project with the compiler first. (demo
videos can be found on BruinLearn).
qBring any questions to Tuesday’s discussion session.

22

You might also like