Visit the page www.cs.colorado.edu/~main/dora and create a dora login for yourself. Use the same login name that you were given for all CU computers, but choose a different password. After creating your login, go back to the dora page, login, and add yourself to the CSCI 1300 roster.
Beginning with the second homework, you'll need to follow a particular programming style that will be discussed in class. For this homework, you can use your own style, provided that you include a comment at the top of the program with:
Find someone with a digital camera or scanner and get a digital picture of yourself in gif or jpg format (or use an old picture). Send the picture to at least one other person in your recitation group, and submit the picture to Dora for Homework IA.
This part of the assignment is open: You may consult with other students and look at their work if it will help you understand. Or you may do your work on your own and show it to someone else for feedback before submitting. You may even work in groups and trade solutions back and forth. Please acknowledge those that you work with by putting a comment at the top of the program.
The purpose Assignment 1B is to make sure that you know how to submit programs through the Dora Assignment Submission Process, and then check your feedback from her.
Write a short program called print42.cxx. The program writes the number 42 followed by exactly one endl (with all output sent to cout). The program does not have any input. There is no other output. Some notes are given below:
int main ( )
return 0;The number zero in this return statement informs the operating system that the program ended successfully.
#include <iostream> using namespace std;
After you check that the program compiles and runs correctly, go to the following page to submit your program to Dora:
www.cs.colorado.edu/~main/doraRemember, the purpose is merely to make sure that you can use the dora system. Keep in mind that the dora system may get bogged down or be unavailable if you wait until the last minute to submit your work. I'd suggest that you submit at least 24 hours ahead of time to avoid late penalties from unexpected problems (that aren't always your fault!)
After you submit to Dora, wait a few minutes and then check her feedback. You do this by clicking the button to submit assignments. All assignments are listed there with their current status. If she rejected the program for any reason, you may fix the problem and resubmit.
This part of the homework is also open, so that you may work with others (as described in IB).
The purpose of Assignment 1B is to make sure that you know how to write a small program that reads some information, does a calculation, and prints results that are based on that calculation.
Write a short program called bmi.cxx to calculate a person's "body mass index" as described below.
The Input: The program asks the user for these pieces of information:
The Output: The program prints messages with this information:
10,000 * (weight in kg) / (height in cm)²
Note:There is a "division" symbol in the middle of the above formula and a "square" symbol at the end.
Budge up, yeh great
giant, you be taller than Hagrid.
You do look a
great deal like a mouse.
You are a fugitive from the law of averages.
Check that the program compiles and runs correctly. Submit the program to Dora and check the results a few minutes later. If Dora did not give you credit, then you can fix any errors and resubmit.
This part of the homework is a take-home exam.
This means that you may not discuss or consult with anyone other
than the course instructors. Please put one of this messages
in the comment at the top of your program:
On my honor as a University of Colorado at Boulder student, I have neither given nor received unauthorized help with this assignment. I understand that any violation of this policy will result in a grade of F for the entire course.Or (if you could not complete the assignment):
I could not complete the assignment without help and am submitted it for no credit. Please contact me about getting help from the instructors for the next assignment.
If you end up not submitting one or two of the take-home exams, it will lower your grade, but just a little bit. The points for the take-home parts are relatively small. But we need to know that you are doing those parts by yourself so that we can do accurate evaluations of where the class is (as a whole) and where you are individually. Doing these evaluations allows us to determine whether most students correctly understood what was learned in the open assignments, and it allows us to provide customized help. Anyway, on to the assignment...
You have a choice of two possible investment plans: In both plans, you will have a fixed number of dollars to invest (called the "amount") for a fixed time period.
In plan A:
Write a program that reads all the necessary information from the user, computes the value of the investment at the end of the period (taking taxes into account), and prints an additional message indicating whether one plan is better than the other (and if so, which one is better).
Note: The results of your program may consfuse you. For example, you might provide input data that *should* end up with the two plans being equal...but they aren't. This is caused by an inaccuratcy in double number arithmetic, which we will discuss next week.
Check that the program compiles and runs correctly, and submit the program to Dora. Dora will not grade this one (except to record one point for submission), but your TA will provide some feedback and grading.
Work should be submitted to Dora by 9am on Wednesday, Jan 22. And you should bring a printout of the investment comparison to your recitation to turn in to the TA.
Students who do not give a printout to the TA during recitation will have a 10% penalty. Students who submit work after 9am on Wednesday will have an additional penalty: 10% for late Wednesday submission; 30% for Thursday submission; 50% for Friday submission; 70% for weekend submission; 90% for Monday submission. No submissions after Monday.