CS 246 - Object-Oriented Software Development copy.pdf

CS 246 - Object-Oriented Software Development copy.pdf - CS...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
11/24/2016 CS 246 - Object-Oriented Software Development http://dzed.me/notes/2016/05/02/Cs-246.html 1/140 CS 246 - Object-Oriented Software Development CS 246 - Object-Oriented Software Development Instructor: Brad Lushman Section: 001 Location: MC 4045 Time: Tuesdays and Thursdays 10:00am - 11:20am Tutorials: MC 4060 Wednesdays 1:30pm - 2:20pm Term: Spring 2016 Shoutout to Brian Forbes, Steven Yang , and Ziqi Zhou ! May 3, 2016 - Lecture 1 Grading Scheme Assignments - 0(A0) 7 7 7 7 12(project) = 40% Midterm (4:30pm - 6:20pm, June 23 (Th), 2016) = 20% Final = 40% This course requires you to work in Linux. There are several options: 1. Lab machines 2. Install Linux on your own machines 3. Make SSH connection to school machines (Use Putty (putty.exe) on Windows, winscp for Úle transfer, XMing for Xwindows) 4. Download cygwin - Linux-like environment for Windows 5. Get a Mac 4 Modules in this Course: Dadi "D.Z." Zhang Blog Dream List Go Tutorials Notes Projects Résumé
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
11/24/2016 CS 246 - Object-Oriented Software Development http://dzed.me/notes/2016/05/02/Cs-246.html 2/140 Linux Shell (2 weeks) C++ Language, C++14 (10 weeks) Tools Software Engineering (design etc.) “Homework”: Go on Piazza -> Linux Reference Sheet -> Save and print Module 1: Linux Shell A shell is an interface to the operating system, i.e. how we get the OS to do things (run programs, manage Úles etc.). There are two kinds of shells: graphical (with icons and clicking) and the command line. The shell we will use is Bash. Check if you are using Bash, login to shell and type in: $ echo $0 It should return “bash”. Linux Úle system: working with Úles cat - short for concatenate; display contents of a Úle (e.g. cat user/share/dict/words). In Linux, a directory is considered a special kind of Úle ls - list Úles in the current directory (non-hidden Úles) ls -a - list all Úles (including hidden; hidden Úles start with a “.”) pwd - print current directory (pwd = print working directory) What happens when we only type in “cat”? It just kind of sits there, waiting for input. It’s kinda like a parrot, repeating what you typed in. If we can capture the output into a Úle… $ cat > output.txt It would capture the input. NOT RECOMMENDED: ^C. It would prevent cat from doing clean-up. Let it Únish on its own: ^D at the beginning of a line
Image of page 2
11/24/2016 CS 246 - Object-Oriented Software Development http://dzed.me/notes/2016/05/02/Cs-246.html 3/140 sends an “EOF” signal to cat. One greater than sign replaces, two appends. In general, command args > Úle executes command args + captures the output in Úle -> called output redirection. Using less than sign, takes in input from the Úle. $ cat < output.txt The line above displays the Úle. Seems to be equivalent to what we have before. Are these two things the same? NO. The reason is very important: cat input.txt -> passes the NAME input.txt to cat as an argument. Cat opens input.txt and displays its contents cat < input.txt -> the shell opens the Úle and passes the contents to cat IN PLACE of keyboard input wc - word count, displays numbers of lines, words, and characters of a Úle cat *.txt - *.txt globbing pattern -> matches any sequence of characters
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern