This website houses notes from my studies at the University of Liverpool. If you see any errors or issues, please do open an issue on this site's GitHub.
Doc Comments This is the proper way to write multi-line comments to summarise a code file. You can later compile these into doc files: /** * This program does such and such. * @author Ben Weston <b.weston60@gmail.com> */ Strongly Typed Languages In strongly typed languages you must explicitly say the...
This lecture follows through some examples of solving particular problems in pseudo code. The slides for this lecture are available here. Factors of $x$ but Not Factors of $y$ In this example we find the factors of $x$ and $y$ and subtract the elements in the $y$ list from the...
Recommended Schedule Mon-Tue (1-2h) Watch videos, take a quiz, ask discussion questions. Tue-Wed (3h) Attend a lab and solve programming exercises. Wed (1h) Lecture, Q&A at 1pm. Contact Enquiries should be directed to Patrick Totzke at: totzke@liverpool.ac.uk. The professor will also be on Gather on Wednesdays 2-3pm. Introduction to OOP...
Algorithms An algorithm is a precise and concise set of instructions that guide you to solve a specific problem in a finite amount of time. graph LR Input --> Algorithm Algorithm --> Output The differences between algorithms and programs are as follows: In algorithms the content is more important than...
Java can be thought of as a sequence of statements with each statement ending with a semi-colon. Comments Everything after a double slash // is a comment. Multi-line comments start with: /* and end in */ Blocks Statements surrounded by curly brackets form a block. Blocks can be nested. Example...
Java is an interpreted language that compiles into bytecode in order to make optimisations. To run a java program you would complete the following steps: Compile a source code file Hello.java with javac Hello.java. This will create a bytecode file Hello.class. Start the JVM and run Hello.class with java Hello....
Number Recall the different classes of number and recognise which is the most suitable in different contexts. Be aware of how the call of real number originates and the idea of the subset of reals obtains as roots of polynomial expressions. Typical Questions You may be asked which type of...
Linear transformation s map between vector spaces. When we use some method $T$ to produce a vector $\vec v$ in some vector space $V$ from a vector $\vec u$ belonging to a vector space $U$. Formally: \[T:U\rightarrow V\] $U$ and $V$ can be the same vector space: \[U=V=R^2\] These may...
Vector spaces allow us to collect together vectors with similar characteristics. Basics We have $U$ - a set of $n$-vectors using $H$: e.g. $U$ is the set of all 3-vectors from $\Bbb R$. The set $U$ defines a vector space if it has two closure properties: Adding any two vectors...