gcis-124/week1/10-01-2022/10-01-2022.tex

75 lines
2.8 KiB
TeX

% File: 10-01-2022.tex
% Created: 16:53:22 Mon, 10 Jan 2022 EST
% Last Change: 16:53:22 Mon, 10 Jan 2022 EST
%
\documentclass[letterpaper]{article}
\usepackage{amssymb}
\usepackage{listings}
\usepackage[shortlabels]{enumitem}
\usepackage{soul}
%\usepackage[smartEllipses,hashEnumerators,hybrid]{markdown}
%\usepackage{minted}
\usepackage{geometry}
\usepackage{dirtytalk}
\usepackage{lplfitch}
\geometry{portrait, margin=1in}
%\begin{minted}[linenos,bgcolor=LightGray]{[language]}
\date{01/10/2022}
\title{%
Introductory Lecture\\
\large GCIS--124--04:Software Development and Problem Solving II}
\author{Blizzard MacDougall}
\begin{document}
\maketitle
\pagenumbering{arabic}
The majority of the course is based on exams (50\% between the 3 midterms and the
final), and assignments (an additional 25\%). The final will include a practical,
and will be 50/50 code and text quetions. The exams will be mostly code, with
30\% being multiple choice questions.
\section{Java Eccentricities}
Java's a high level language. This gets compiled into bytecode, which are files
that have a \verb|.class| extension. This code is then executed in a Java virtual
machine. Because all Java code is written for a VM, it can run on any platform
\dots theoretically.
Java requires a lot of scaffolding to write any program. Every program must be
within a class, and you must have a \verb|main| function within that class.
All methods written in the first unit of this course will be \verb|static|.
Additionally, all classes and methods will be public for the first unit. The
name of the file needs to be character-identical to the name of the file, and
they are conventionally PascalCase.
Strings are always double-quoted. Single-quotes are for \verb|char|s. Variables
must be declared with a type, but you do not have to initialize it. Java has two
main groups of types, primitives and references. Primitives are anything that
can translate to bits (byte, short, int, etc). Anything else is a reference type.
Any unlabeled number is assumed to be either an int or a double, depending on
whether there's a decimal or not. You can force a long or float by having the
suffix \verb|l| or \verb|f|, respectively. Every statement has to have a semicolon.
Strings and ints can be concatenated without casting (at least in the instane of
\verb|System.out.print(ln)|.
\section{Math}
There is no unique function for integer division. Dividing two integers will do that.
Powers are done through \verb|Math.pow(x, y)| to get $x^y$. Things are always
promoted to the most precise type.
\section{Return}
Return types have to be declared. Voids do not need a return call, but must be
argument-less if used.
\section{Boolean}
Booleans are the same as in C++, as are comparators. Conditionals are \verb|if|,
\verb|else if|, and \verb|else|.
\end{document}