Homework Assignment #2

 

CS 161: Introduction to Computer Science 1

 

 

Submit your assignment to the D2L Dropbox (sign on via www.my.pdx.edu)

 

***Homework in CS161 consists of written homework and programming***

 

1.      Create an Algorithm for responding to a discussion topic on D2L. Think of (a) how do you login, (b) how do you get into the discussions, (c) how do you respond, etc.

·        Assume you are writing the algorithm for someone who has never used D2L before

·        Be careful not to skip any steps

·        Desk check your algorithm (go through the algorithm and see if you can follow the steps!)

 

2.      Think about Style (i.e., how readable and/or maintainable a program is). Examine the program that was submitted for Homework #1. Think about what could be improved to make it more readable. Find 3 things that could be improved and write about them using complete sentences.

 

3.      Ethics. Ethics involves many aspects of working with computers, programs, and computer data. One aspect is providing clear messages to users so that they will know how best to respond.  Give an example of an unclear message you have encountered in the past. Explain what the message said and what it meant to you. Can you think of a better message that would have been clearer to you?

 

4.      Programming. You have two choices for creating a program in homework #2. Only select one of the choices.

 

·        Graphics: (If you are using Dev C++ and graphics.h then you can select this project)

Write a C++ program that creates an avatar, some graphical representation to be used in place of the user and/or player of a game. The program must use (a) lines, (b) circles or ellipses, and (c) text. Try to have fun with it!

 

·        Or, on Unix or for Mac users: (If you are using Unix or Linux then you can select this project)

Write a C++ program that calculates an average grade of 5 homework assignment grades, each worth 100 points maximum. (Hint: This will be very similar to the inches to mm program in the slides, except that the math and inputs are different).

Try to have fun with this!!