Project1-Fall2011 - PROJECT 1: CONVERSIONS This...

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PROJECT 1: CONVERSIONS This first project is supposed to introduce you to the compiler and the programming language in general. It is a simple program that requires little knowledge of programming from your part, but hopefully it will make you understand the very basic notions of C++ more easily. What you have to do is create a program that can perform a series of conversions for three well known different formats. They are: 1. Temperature. Celsius and Fahrenheit are the two most often used formats. 2. Distance. Feet and Meters are used primarily. 3. Weight. Pounds and Kilograms. The formulas are: Tc=5/9 * (Tf- 32) Tf=9/5 * Tc +32 M=ft*0.3048 ft=M/0.3048 Kg=Lb/2.2 Lb=Kg*2.2 where Tc. Tf are the temperatures in Celsius and Fahrenheit accordingly, M and ft are meters and feet and Kg and Lb are kilograms and pounds. The program is supposed to only make one conversion at a time. That means that if the user requires a second conversion they will have to re- execute the program from scratch. Clearly, this is not the way modern programs are built, however that way control structures that have not yet been taught are needed. The deadline for the project is Monday, Sep 5 at 11.55 pm. CAUTION: You are supposed in all the programs that you write to follow exactly the format and flow execution of the program as presented to you. Please do not changes the menus or the options from the ones given in the executables and the Sample run. SAMPLE RUN First Sample Run: Converter Main Menu Please choose one of the following options 1. For Temperature Conversions 2. For Distance Conversions 3. For Weight Conversions Press any other number to quit. Choose: 1 1. Fahrenheit -> Celsius 2. Celsius -> Fahrenheit 1 Please give the degrees in Fahrenheit: 94 94 degrees Fahrenheit correspond to 34.4444 degress Celsius. Quitting.. Second Sample Run: Converter Main Menu Please choose one of the following options 1. For Temperature Conversions 2. For Distance Conversions 3. For Weight Conversions Press any other number to quit. Choose: 2 1. Feet -> Meters 2. Meters -> Feet 2 Please give the distance in meters: 100 100 meters correspond to 328.084 feet. Quitting.. Third Sample Run: Converter Main Menu Please choose one of the following options 1. For Temperature Conversions 2. For Distance Conversions 3. For Weight Conversions Press any other number to quit. Choose: 16 Quitting.. ...
View Full Document

This note was uploaded on 11/16/2011 for the course COP 2271 taught by Professor Staff during the Fall '11 term at University of Florida.

Ask a homework question - tutors are online