Home / Expert Answers / Computer Science / please-attached-the-project-so-i-can-submit-it-thank-you-read-carefully-also-attached-is-the-sub-pa335

(Solved): please attached the project so I can submit it. thank you, read carefully. Also, attached is the sub ...



please attached the project so I can submit it. thank you, read carefully. Also, attached is the submission format.

This programming project will allow the user to create a table of unit conversions, where the user specifies:
- the dimension
2. The user should be prompted to enter the dimension (Density, Torque, Power, or Pressure). NOTE: You can pick which 3 of th
4. The unit entries should be read as strings and any combination of uppercase and lowercase letters can be used. The user sh
9. Use WHILE or DO-WHILE loops to allow the user to correct any bad inputs (and provide a suitable error message). Bad inputs
Test Cases:
Run the following test cases, as it applies to the conversions chosen for the program:
Report:
Follow the guideli
Format for Programming Projects
Items to submit:
- Report (turn in by hand during class)
- Submit zipped computer files in Bl
Program Formatting Requirements:
- The main program should begin with these comments:
- TCC logo (// these are comments // )
- Global variables
- Avoid using global variables in most cases.
- Global variables may be used for constants, such as pi.
-
This programming project will allow the user to create a table of unit conversions, where the user specifies: - the dimension (example: length) - the starting unit (example: ) - ending unit (example: ) - the starting value (example: 0 ) - the ending value (example: 10 ) - the increment (1) - the number of digits after the decimal point for the starting unit (example: 1 ) - the number of digits after the decimal point for the ending unit (example: 3 ) For the example above, the output might be similar to the table shown below: 2. The user should be prompted to enter the dimension (Density, Torque, Power, or Pressure). NOTE: You can pick which 3 of these to implement, doing all 4 earns extra credit. 3. The user should be given a choice of initial units and final units for each dimension as follows: - Density: - Torque: -m, ft-lb, oz-in - Power: hp, kW, BTU - Pressure: , psi, Note that the initial unit cannot be the same as the final unit, but there are still many possible conversions. For example, with power there are 6 possible conversions 4. The unit entries should be read as strings and any combination of uppercase and lowercase letters can be used. The user should be able to use the full unit name (plural or singular) or the symbol (for example: kilowatts, kilowatt, kw, or kW). 5. Use a function to convert the input unit entry to its symbol form. Only the unit symbol should be used in the column headings of the output display table. 6. Compute the conversion result for output table. Your program needs choose from at least 18 of these conversion factors. There are many online sources for conversion factors. One example is the unit conversion online program called 'Digital Dutch' (https://www.digitaldutch.com/unitconverter/length.htm). An example is shown below. If a value of is entered and converted to , we see that the conversion factor is 0.3048 . 7. The output display table should include column headings with the dimension name and the unit symbol. The number of digits displayed must match the requested user entries specified. The table should be right justified and all decimal points should be aligned. See the sample table on the previous page. 8. The program should calculate the number of lines in the table based on the user inputs specifying starting value, ending value and increment. The number of lines in the table must be at least 3 , but not more than 25 . If the ending value is not a multiple of the increment, the table should end with the last possible value before the ending value specified. For example, if the user specifies the following value: Starting value: 10 Ending value: 100 Increment: 20 The program should determine that 5 lines are needed and that the last value in the table should be 90 (not 110 ). 9. Use WHILE or DO-WHILE loops to allow the user to correct any bad inputs (and provide a suitable error message). Bad inputs checking should occur with: - Choice of dimension (Density, Torque, Power, or Pressure) - Choice of units (with correct spelling) for each dimension - Starting and ending unit cannot be the same - Number of digits - Starting value, increment and ending value must all be positive. - Number of lines in the table must be from 3 to 25. If this condition fails, the user should re-enter a new set of three entries: the starting value, increment and ending value. Page 3 10. Give the user the option of re-running the program (a do while loop is recommended). 11. Efficiency: The program must be efficient use of source code lines or else it could become exceeding long (and some grade penalties will apply). For example, a poorly written program might repeat the code lines for generating a table in a dozens of places for the many possible conversions. An efficient program would only have one set of instructions to generate a table and the table would use the assigned values for dimension, units, digits, starting value, etc. 12. The program should use at least 3 functions, including: a. A function to convert a string to a unit symbol. b. A function that returns the appropriate conversion factor based on the starting unit and ending unit symbols. Your program needs at least 18 of these conversion factors. c. Another function of your choice (useful and well-designed). Test Cases: Run the following test cases, as it applies to the conversions chosen for the program: Report: Follow the guidelines listed in Format for Programming Projects (see the course Canvas site). Extra Credit Suggestions: (for a maximum of 10 additional points on the unit project grade) 1. Add additional dimensions and/or units. 2. Add 'grid' lines to divide the rows and/or columns of the table. 3. Use additional well-designed functions. 4. Add an option to have a table with either 2 or 3 columns. If 3 columns are selected, a prompt might be needed so the user can enter a unit. 5. Implement the assignment as a DevC ++ 'project' with separate files for the main, functions, and header. 6. Provide function diagrams of inputs and outputs. 7. Provide a flowchart of the main program. Format for Programming Projects Items to submit: - Report (turn in by hand during class) - Submit zipped computer files in Blackboard. See the document entitled Submitting a Project Using Blackboard. Zipped files should include: o Copy of all related DevC + source files (including any data files, if applicable) - Copy of the executable file (so that the instructor doesn't need to build your project to test it) Copy of your report. It can be uploaded separately, or within the compressed folder. Report Format: The report should contain the following sections: - Title page - Printouts - Main program, including all functions (if applicable) - Data files (if used) - Other files (such as Excel tables and graphs, when applicable) - Test Results - Results for any required test cases - Results for any extra credit features - Check results by hand when possible (not to be turned it - just for your benefit) - Discussion - include three parts (label each) Program performance - describe how the program performs and discuss any possible limitations - Extra credit features - discuss any extra credit features Potential improvements - discuss any possible improvements that could be made to your program FLOWCHART - at high (general, or overview) level that describes blocks of code, not every line. Program Formatting Requirements: - The main program should begin with these comments: - TCC logo (// these are comments // ) - Brief description of the program (1 to 3 lines of comments) - List of inputs and outputs (as general overview comments, and not one line for each/every variable) - Each function should begin with: - Brief description of the program (1 to 3 lines of comments) - List of inputs and outputs (as general overview comments, and not one line for each/every variable) - Declaring variables Declare variables at the top of (yet inside of ...) each function (including the main) - Use clear variable names or provide comments with definitions of each variable - Indentation - use indentation for all (if, else, for, while) structures to make programs more readable Page 2 - Order of functions (if used). Use the following ordering for your project: Prototypes - list all - Main function - Other functions - Functions (when used) o In general functions should be designed for wide application and maximum reusability. - Global variables - Avoid using global variables in most cases. - Global variables may be used for constants, such as pi. - Inputs and outputs for functions should be passed as arguments, not using global variables. - Comments - The key is to make the program readable to other programmers. - Comments should explain function, not syntax. Example (poor comment): Add 1 to Example (good comment): Increment if leap year occurs - Include comments as key structures are entered Example: do // loop to allow user to re-enter time if incorrect Statements(s); - Comments can be omitted when outputs explain the function. Example (unnecessary comment): cout "Enter the weight of the object in lbf"; cin Weight; // Read the weight of the object in lbf (unnecessary comment) - User-friendly programs. Programs should be clear and easy for the user to follow. - Formatted output. Any outputs (in the pop-up window on the screen) should be clear and well organized.


We have an Answer from Expert

View Expert Answer

Expert Answer


AnswerCA++ Code to generate the unit transition tables: #include #include #include#include #includeusing namespace std;//function to convert to low
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe