This repository includes code that complements each lecture, suggested solutions for each assignment and (often) exams, and additional example code for my Object-Oriented Programming in Java and C++ course.
The commands below are based on the bash shell and its cousins. Installing git on Windows adds a bash shell, and Linux and Mac include bash and zsh (a bash-like shell) respectively by default. Similarly, GitHub Codespaces include a bash shell within the proided VS Code environment, although some configuration will be required as discussed in the first lecture.
To create a folder in your virtual machine that is linked to this repository, go to your home directory (cd), copy the following command (select and Ctrl-c) and paste it into your bash or zsh terminal (generally, use right-click -> Paste, Edit -> Paste, or Shift-Control-V):
git clone https://github.com/prof-rice/cse1325-prof.git
To download changes within your terminal at any later time, change to your cse1325-prof directory (cd ~/cse1325-prof) and type:
git pull
If that doesn't work, or the repository has issues, just delete it and clone it again!
On Linux you can open ANY filename from the terminal (using the associated application, which may be graphical) with
xdg-open filename
If you're using the CSE-VM virtual machine or the bash enhancements discussed in lecture (see them at https://github.com/prof-rice/cse-vm.git), this is shorter and perhaps easier to remember:
e filename
In bash and its cousins on any operating system, you can usually print text files to the console using this.
cat filename
Longer files can be viewed (with PgUp and PgDn, or q to quit) using
less filename
(If less doesn't work, use more instead. More is less with less features but is more commonly installed. Linux is fun.)
To edit a text file within the terminal on Linux or a Mac, try
nano filename
Windows includes no equivalent, although if you've installed git as required for this class, something like this should work:
'C:\Program Files\Git\usr\bin\nano.exe' filename
If you're using VS Code, the executable's name is "code" - this also works in GitHub Codespaces:
code filename
If you're using Sublime Text, the executable's name is "subl":
subl filename
Or, in any OS, just use your favorite programming editor to edit code and other text files, and your favorite applications to edit other file types. Beware of complex Integrated Development Environments (IDEs), though - you want to focus on learning Java and C++ this semester, not VS Code or Eclipse!
If you have used this repository during a previous semester, be advised that it is restarted each semester. Previous editions have been renamed as shown below (named for start of term in YYYYMM format except the first, for which the "date" is simply cpp).
And before upcoming students get too excited, assignments change every semester, so ixnay on any eatingchay plans! ;-)
Spring 2021 and earlier (C++ and gtkmm only): https://github.com/prof-rice/cse1325-prof-cpp
Fall 2021 (Java and Swing only): https://github.com/prof-rice/cse1325-prof-202108
Spring 2022 - Spring 2023 (Java and Swing with a touch of C++): https://github.com/prof-rice/cse1325-prof-202301
Fall 2023 (Java and C++ with no Swing or gtkmm): https://github.com/prof-rice/cse1325-prof-202308
Spring 2024 (Java and C++ with no Swing or gtkmm): https://github.com/prof-rice/cse1325-prof-202401