Program Analysis Using App Inventor
What do computer science and the game of battleship have in common?Copyright 2012 Rich Powers, University of Nebraska-Omaha
In computer science, program analysis is used to determine the behavior of computer programs. Flow charts are an important tool for understanding how programs work by tracing control flow. Control flow is a graphical representation of the logic present in the program. In this lesson, students learn about, design and create flow charts for different scenarios, including a game based on the Battleship® created by Hasbro©. In the associated activity, Flow Charting App Inventor, students apply their knowledge from this lesson and gain experience with a software application called App Inventor. This lesson and its associated activity can be stand-alone or used as a launching point for the Android Acceleration Application unit or any lesson involving App Inventor.
Program analysis is a key part of what software engineers do every day. Program analysis has many valuable applications, which include determining program correctness and program optimization. This lesson, with its focus on flow charting, relates to the program correctness aspect of program analysis. Creating flow charts to determine how and why a program behaves the way it does is one way to implement the software/system design cycle, comparable to the engineering design process. The process of creating flow charts relies on the analysis, design and testing steps in these processes.
After this lesson, students should be able to:
- Design an accurate flow chart.
- Test a flow chart to determine its accuracy and correctness.
- Explain how flow charts are used as a tool to design and analyze computer programs.
