“Write a program to calculate the volume of a fish tank based on its dimensions and report the result to the user”
Identify Inputs:
Length, Height Depth
Identify Types:
Length: Real/Float
Height: Real/Float
Depth: Real/Float
Identify Outputs:
Volume: Real/Float
Why is it important to identify the inputs and outputs of a system?
ABSTRACTION- if you identify what u need to input and output, u can remove any unnecessary details, making more efficient solution
What are preconditions?
“Are there any conditions already in place that I need to take into consideration?”
What is Caching?
As you load a program from the hard rive, it drops off some of the code in the cache before going to the CPU. Then, when you load this program again, it only needs to go back to the cache to gain some code (then gets the rest from Hard drive) making it quicker
What is prefetching?
Data is preloaded to cache/ram from Hard-drive before being needed. This makes it quicker to access. Arranged by the scheduler- the programmer tells the scheduler this is probably where the person is gonna go next, so load this pls
However, this can backfire if what u pre-fetched isnt what u need next. U will then need to flush (removing all of the preloaded date)
Reusing code:
Shortens development time
Saves system resources
Lowers development costs
Reduces redundant costs
Subroutines/ OOP
Software Libraries
Is pre-tested so we know it works
Using entire components across program suites-using stuff from the OS in the program to do stuff
API- Application Programming Interface- external code reuse. Pull in code from other apps.