Skip to main content
Contents Index
Dark Mode Prev Up Next
\(\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 19.4 Intro to the Fraction Calculator
Today, we will all be jointly working on a fraction calculator, that is a calculator that can solve simple fraction problems such as
adding, subtracting, multiplying and dividing fractions .
When tackling a bigger programming challenge such as this it’s important to plan ahead!
Here is a first (rather coarse) breakdown of our Fraction Calculator:
Get a fraction problem from the user
Compute the result
Display the result
Continue (y/n)?
Activity 19.1 .
How can we further break down "Get a fraction problem from the user"?
Activity 19.2 .
How can we further break down "Get a fraction"?