Show description
CSE 240 Course Guide
CSE 240 Course Guide
CSE 240 Guide
Course Overview
Welcome to Intro to Programming Languages! This isn't just about learning new syntax. It's about understanding the four major ways to 'think' like a programmer. You'll see how different language paradigms solve problems in fundamentally different ways.
Paradigm 1: Procedural (C)
The foundation. You give the computer a list of instructions. Mastering this is non-negotiable for future systems courses.
Pointers: The most crucial topic. You'll learn to directly manipulate memory addresses. It's powerful but dangerous!
Memory: Understand the Stack (for local variables, fast) and the Heap (for dynamic data, you manage it).
`malloc()`/`free()`: You are the memory manager. If you `malloc` (allocate) memory, you MUST `free` it, or you'll create memory leaks.
Structs: How you create complex data types in C.
Paradigm 2: Object-Oriented (C++)
Builds on C. Instead of just procedures, you bundle data and the functions that operate on that data into "objects."
Classes/Objects: The blueprint and the instance. The core of OOP.
Inheritance: Create new classes that reuse and extend existing ones.
Polymorphism: An object can take many forms. Allows for more flexible and reusable code.
`new`/`delete`: The C++ way of managing heap memory. Just like `malloc`/`free`, you must manage it yourself.
Paradigm 3: Functional (Scheme)
A totally different mindset. Think in terms of pure functions, like in math. State changes are avoided.
Recursion is King: Loops are rare. You'll solve problems by breaking them down into smaller, self-similar problems.
Immutability: Data doesn't change. You create new data instead of modifying old data.
First-Class Functions: Functions are just like any other data. You can pass them as arguments and return them from other functions.
Paradigm 4: Logic (Prolog)
The most abstract paradigm. You don't tell the computer *how* to solve a problem, you just describe the problem.
Facts & Rules: You define a knowledge base. (e.g., "Socrates is a man.", "All men are mortal.")
Queries: You ask the system questions based on its knowledge. (e.g., "Is Socrates mortal?")
Unification: The process Prolog uses to match patterns and find answers.
Must Remembers!
POINTERS IN C/C++: Practice, practice, practice.…
CSE 240 Course Guide
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSE 240 Course Guide</title>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap" rel="stylesheet">
<style>
:root {
--gb-body: #a0a0a0;
--gb-dark-gray: #343434;
--gb-screen-bg: #c4cfa1;
--gb-screen-border: #111;
--gb-button-a: #8b0000;
--gb-button-b: #a52a2a;
--gb-dpad: #222;
--gb-text: #3a4524;
--gb-header: #2c331c;
}
body {
background-color: #333;
font-family: 'VT323', monospace;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
padding: 20px;
}
.gameboy {
background-color: var(--gb-body);
border-radius: 10px 10px 60px 10px;
padding: 25px;
width: 100%;
max-width: 450px;
box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 5px 15px rgba(255,255,255,0.2);
position: relative;
border: 2px solid #888;
}
.screen-area {
background-color: var(--gb-dark-gray);
border-radius: 15px 15px 35px 15px;
padding: 20px;
margin-bottom: 30px;
position: relative;
}
.screen-area::before {
content: 'DOT MATRIX WITH STEREO SOUND';
font-family: 'Press Start 2P', cursive;
font-size: 8px;
color: #d3d3d3;
position: absolute;
bottom: 5px;
left: 50%;
transform: translateX(-50%);
letter-spacing: 0.5px;
}
.screen {
background-color: var(--gb-screen-bg);
border: 4px solid var(--gb-screen-border);
border-radius: 5px;
padding: 15px;
height: 450px;
overflow-y: auto;
color: var(--gb-text);
font-size: 18px;
line-height: 1.4;
}
/* Custom scrollbar for the screen */
.screen::-webkit-scrollbar {
width: 10px;
}
.screen::-webkit-scrollbar-track {
background: #9ead86;
border-radius: 5px;
}
.screen::-webkit-scrollbar-thumb {
background: var(--gb-text);
border-radius: 5px;
}
.screen::-webkit-scrollbar-thumb:hover {
background: #555;
}
.screen h1 {
font-family: 'Press Start 2P', cursive;
font-size: 16px;
color: var(--gb-header);
text-align: center;
margin-bottom: 15px;
text-transform: uppercase;
}
.screen h2 {
font-family: 'Press Start 2P', cursive;
font-size: 14px;
color: var(--gb-header);
border-bottom: 2px solid var(--gb-text);
padding-bottom: 5px;
margin-top: 20px;
margin-bottom: 10px;
}
.screen ul {
list-style-type: none;
padding-left: 0;
}
.screen ul li::before {
content: '>';
margin-right: 10px;
font-weight: bold;
}
.screen .must-remember li::before {
content: '!!';
color: var(--gb-button-a);
}
.screen strong {
color: var(--gb-header);
font-weight: normal; /* VT323 is already bold-like */
}
.controls {
display: flex;
justify-content: space-between;
align-items: center;
}
.d-pad {
width: 80px;
height: 80px;
position: relative;
background-color: var(--gb-dpad);
border-radius: 50%;
}
.d-pad::before, .d-pad::after {
content: '';
position: absolute;
background-color: var(--gb-dpad);
}
.d-pad::before { /* Vertical */
left: 50%;
top: 0;
width: 24px;
height: 100%;
transform: translateX(-50%);
border-radius: 5px;
}
.d-pad::after { /* Horizontal */
top: 50%;
left: 0;
height: 24px;
width: 100%;
transform: translateY(-50%);
border-radius: 5px;
}
.ab-buttons {
display: flex;
align-items: center;
}
.button {
width: 50px;
height: 50px;
border-radius: 50%;
border: 2px solid rgba(0,0,0,0.3);
box-shadow: 0 3px 5px rgba(0,0,0,0.3);
display: flex;
justify-content: center;
align-items: center;
font-family: 'Press Start 2P', cursive;
color: white;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.button.a {
background-color: var(--gb-button-a);
margin-left: 20px;
}
.button.b {
background-color: var(--gb-button-b);
margin-left: 10px;
}
.start-select {
display: flex;
justify-content: center;
margin-top: 25px;
}
.pill-button {
width: 60px;
height: 20px;
background-color: var(--gb-dark-gray);
border-radius: 10px;
margin: 0 10px;
border: 2px solid #555;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Press Start 2P', cursive;
font-size: 8px;
color: #d3d3d3;
}
.brand {
position: absolute;
bottom: 15px;
right: 25px;
font-family: 'Press Start 2P', cursive;
font-size: 14px;
color: #8b0000;
transform: rotate(-15deg);
opacity: 0.8;
}
</style>
</head>
<body>
<div class="gameboy">
<div class="screen-area">
<div class="screen">
<h1>CSE 240 Guide</h1>
<h2>Course Overview</h2>
<p>
Welcome to Intro to Programming Languages! This isn't just about learning new syntax. It's about understanding the <strong>four major ways to 'think' like a programmer</strong>. You'll see how different language paradigms solve problems in fundamentally different ways.
</p>
<h2>Paradigm 1: Procedural (C)</h2>
<p>
The foundation. You give the computer a list of instructions. Mastering this is non-negotiable for future systems courses.
</p>
<ul>
<li><strong>Pointers:</strong> The most crucial topic. You'll learn to directly manipulate memory addresses. It's powerful but dangerous!</li>
<li><strong>Memory:</strong> Understand the Stack (for local variables, fast) and the Heap (for dynamic data, you manage it).</li>
<li><strong>`malloc()`/`free()`:</strong> You are the memory manager. If you `malloc` (allocate) memory, you MUST `free` it, or you'll create memory leaks.</li>
<li><strong>Structs:</strong> How you create complex data types in C.</li>
</ul>
<h2>Paradigm 2: Object-Oriented (C++)</h2>
<p>
Builds on C. Instead of just procedures, you bundle data and the functions that operate on that data into "objects."
</p>
<ul>
<li><strong>Classes/Objects:</strong> The blueprint and the instance. The core of OOP.</li>
<li><strong>Inheritance:</strong> Create new classes that reuse and extend existing ones.</li>
<li><strong>Polymorphism:</strong> An object can take many forms. Allows for more flexible and reusable code.</li>
<li><strong>`new`/`delete`:</strong> The C++ way of managing heap memory. Just like `malloc`/`free`, you must manage it yourself.</li>
</ul>
<h2>Paradigm 3: Functional (Scheme)</h2>
<p>
A totally different mindset. Think in terms of pure functions, like in math. State changes are avoided.
</p>
<ul>
<li><strong>Recursion is King:</strong> Loops are rare. You'll solve problems by breaking them down into smaller, self-similar problems.</li>
<li><strong>Immutability:</strong> Data doesn't change. You create new data instead of modifying old data.</li>
<li><strong>First-Class Functions:</strong> Functions are just like any other data. You can pass them as arguments and return them from other functions.</li>
</ul>
<h2>Paradigm 4: Logic (Prolog)</h2>
<p>
The most abstract paradigm. You don't tell the computer *how* to solve a problem, you just describe the problem.
</p>
<ul>
<li><strong>Facts & Rules:</strong> You define a knowledge base. (e.g., "Socrates is a man.", "All men are mortal.")</li>
<li><strong>Queries:</strong> You ask the system questions based on its knowledge. (e.g., "Is Socrates mortal?")</li>
<li><strong>Unification:</strong> The process Prolog uses to match patterns and find answers.</li>
</ul>
<h2 class="must-remember">Must Remembers!</h2>
<ul class="must-remember">
<li><strong>POINTERS IN C/C++:</strong> Practice, practice, practice. Draw diagrams. Understand what the `*` and `&` operators do. This will haunt you or help you in every future CS course.</li>
<li><strong>MEMORY MANAGEMENT:</strong> For every `malloc` or `new`, there must be a corresponding `free` or `delete`. This is a fundamental concept in low-level programming.</li>
<li><strong>RECURSION:</strong> Get comfortable with it in Scheme. It will make you a better problem solver in ANY language.</li>
<li><strong>PARADIGM SHIFTING:</strong> Don't try to write C code in Scheme, or Scheme code in Prolog. Embrace the new way of thinking for each language. This is the entire point of the course.</li>
</ul>
</div>
</div>
<div class="controls">
<div class="d-pad"></div>
<div class="ab-buttons">
<div class="button b">B</div>
<div class="button a">A</div>
</div>
</div>
<div class="start-select">
<div class="pill-button">SELECT</div>
<div class="pill-button">START</div>
</div>
<div class="brand">ASU</div>
</div>
</body>
</html>