Write short essay responses to these questions.

(a) Give one example of a task for which you would not write a program, and give another example of a task for which you would write a program. (b) What’s the difference between an array, a matrix, and a tree? Give an example where we have used each to represent some data of interest to us.
(c) Why is a tree a better representation for files on a disk than an array? Why do you have many directories on your disk, and not just one gigantic one?
(d) What are some advantages that Vector-Based graphics have over Bitmap Graphical representations (like JPEG, BMP, GIF)?

(a) I wouldn’t write a program for a task that is easy to do with an existing application. I would write a program for a task that isn’t easy to do with an existing application.
(b) An array is one-dimensional storage of data of the same type. We have used arrays for pixels and sound samples. We also used an array to store grades for a student. A matrix is a two-dimensional storage of data of the same type. We used arrays for pixels in a picture. A tree is used to store hierarchial data like a directory structure.
(c) Because a directory can contain another directory and/or files. We have many directories so that we can find data easily.
(d) In vector-based graphics you store a command language that describes how to draw the picture. In bitmap representations you store the color at each pixel. The vector-based graphics files are usually smaller than the bitmap representation. The vector-based representation also allows you to modify the objects in the picture instead of just the pixel colors. You can change the end-point of a line easily in vector-based representations.

Computer Science & Information Technology

You might also like to view...

?Identify the kind attribute that is a default translation of a dialog from a media clip whose language is specified in the srclang attribute.

A. ?descriptions B. ?chapters C. ?captions D. ?subtitles

Computer Science & Information Technology

When a browser loads a page, it looks for ____________________ and other scripted code, and displays a message letting you know that content has been blocked.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology