Decisions, Decisions, Decisions Assignment

Decisions, Decisions, Decisions Assignment - display the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment: Lab 5: Decisions Decisions Decisions   Assignment Information Maximum grade: 100  Due date: February 21, 2008 (Late) Instructions: 1. Sorting Things Out  - Write a program that has the user enter  3  first names (no spaces in the  names and all of the names are different). The program outputs the names in the order in  which they were read and then outputs them in sorted order. For example, the names "John",  "Mary", and "Adam" would be outputted (filename:  sorting.cpp  and script file  sorting.txt ): Adam John Mary 2. We Got Time  - Write a program that asks the user to enter the number of seconds. The  program then converts the seconds to minutes, hours, or days using these rules (filename:  minutes.cpp  and script file  minutes.txt ): rule 1: If the number of seconds is greater than or equal to 60 then the program should 
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: display the number of minutes as a floating point. Therefore, 80 seconds is 1.33 minutes. rule 2: if the number of seconds is greater than or equal to 3,600 then the program should display the conversion in hours. Again the output should in floating point. rule 3: If the number of seconds is greater than or equal to 86,400 then the program should display the conversion in days. Again the output should be in floating point. Upload and Submit both source code and script files for each program to WebCT. Thats 4 files in total. Assignment files: None Submissions: You can only submit your assignment once. No re-submission is permitted. Notification: The instructor will not be notified via email when you submit this assignment....
View Full Document

This document was uploaded on 05/01/2011.

Ask a homework question - tutors are online