Home Page

Programming
From Problem to UML to C

QR Code Link

Unit Wk
Topic & Application
Falling ObjectOptical LensRoot Finding
Start: Language Independent Work for Programming
1
Intro
C1
⬩11
A. Course Introduction(pptx)
B. Install Compiler/Editor (MinGW & Notepad++)
Milestone 1 Tools
Read Part 1 Teaching Notes §1 The Course and Tools
2
Problem
C2 A. Review (tools): Compile→Link→run→debug (htm)
B. Understanding the Problem (pptx)
v=f(t) OR v≠f(t) ? Lens Theory Bisection
Problem(pptx) Problem(pptx) Problem(pptx)
3
UML
C3
⬩12
⬩20
Read Part 1 Teaching Notes §2 UML Diagrams (pg 4-8)
A. Theory: Defining Algorithms with UML (pptx)
B. Apply: Represent solution process with UML
UML(pptx) UML(pptx) UML(pptx)
C. Milestone 2 UML (example)
4
Function
C4
⬩21
Milestone 2_UML T1; 1_tools T2
Theory: Implementing the UML: Planning for Functions pptx
Apply: Decide on function: your own || library || others.
UML → g_func.c UML → o_func.c UML → r_func.c
Check: Walking through: Deciding Functions...
Func(pptx) Func(pptx) Func(pptx)
End: Language Independent Work for Programming
Start: Basic C Programming
5
Variables
C5
⬩22
Read SDBA §1.2 Variables pg 3-16 YZU
Milestone 2_UML T2; 1_tools T3
Review UML →Pseudo-Code: Falling Object, Optics, Root
Theory: Coding w/ Variables (pptx) Code
Practice: General Concepts §3 Variables p.24
C6
⬩23
🔑
Milestone 2_UML T3; 1_tools T4
Apply: Create machine code (floating point variables)
g_func.c→g_var.c o_func.c→o_var.c r_func.c→r_var.c
Check: Walking through "a" solution...
g_var(pptx) o_var(pptx) r_var(pptx)
C7
⬩24
⬩31
Coordinate System
o_var.c→o_com.c
o_com.c→o_coord.c
Rule Breaking
Midterm ⬩1Retry Milestone 1_tools(C)
⬩25Retry Milestone 2_UML(B)
⬩32Retry Milestone 3_var(A)
6
Pointers
C9
⬩26
⬩33
Prepare: Read SDBA §1.3 Pointers pg 16-31 YZU
Review: UML→Code a= f(a,b,c) g=(a,b,c) Quad 1 root
Theory: Pointers & Addresses(pptx)
Practice: General Concepts §4 Pointers p.25
Retry Milestone 1_tools, 2_UML, 3_var
C10
⬩27
⬩34
⬩41
Prepare: Read SDBA §1.4 Pointers & Functions pg 31- YZU
Theory(2): Pointers & Functions(pptx) vpfunc(pptx)
g_var.c → g6ptr.c o_coord.c → o6ptr.c r_var.c → r6ptr.c
Check: Walking through "a" solution...
Walk: g_ptr(pptx) Walk: o_ptr(pptx) Walk: r_ptr(pptx)
Milestone 4_VP, Retry 1_tools, 2_UML, 3_var
Summary: Pointers/Variables
Read: Part 1 Teaching Notes ยง5 Pointers (pg16-19)
7
Flow
C11
⬩28
⬩35
⬩42
C12
🔑
⬩36
⬩43
C13
Decision & Repetition (pptx) OC(pptx)
Apply: flow control to complete solution
Decision
→ Fix Lens Equ.
o_ptr.c → o_if.c
Walk: if(pptx)
Multiple Files
o_if.c → o_main.c + olib.c + olib.h
Walk: o_split(pptx)
Repetition + Files (Mistype ↓)
g_ptr.c → g_loop.c mgdt.csv
Multiple Lens
o_main.c → o_loop.c
(olib.c & olib.h)
olens.csv
Decision + Repetition → Converge
r_ptr.c → r_flow.c
Walk: g_loop(pptx) Walk: o_loop(pptx) Walk: r_flow(pptx)
Read/Review: Part 1 Teaching Notes §4 Flow Pg. 14
End: Basic C Programming
Start: Improving Efficiency/Clarity by Data Abstraction
8
Arrays
C14
⬩37
⬩44
⬩51
C15
⬩38
⬩45
⬩52
⬩61
Prepare: Read SDBA §2.1 Arrays pg xx- YZU
Theory: Array Outline & SDBA§2.1
Apply: Separate in→calc→out
(modify UML)
Apply:quadratic
ax2 + bx + c = 0
g_loop.c→g_arr.c (mgdt.csv) o_loop.c→o_arr.c
(olib.c & olib.h)
r_flow.c → r_quad.c
Check: Walking through "a" solution...
Walk: g_arr(pptx) Walk: o_arr(pptx) Walk: r_quad(pptx)
Final C16 ⬩⬩Retry All Milestones
Walk through milestones (Small Groups with TA)
9
Records
F1 ⬩? F2 ⬩? Prepare: Read SDBA§2.2 Records
Theory: Records Intro & SDBA§2.2
Apply: Link x,y data & no call-by-reference user functions
g_arr.c → g_rec.c (mgdt.csv) o_arr.c→o_rec.c
(olib.c & olib.h)
-
Walk: mgrav2.swf Walk: mopt.swf -
10
Next→
EX g_rec.c(mgdt.csv) o_rec.c -
Final Code, Files & Text