Project 2 Program Design Hi please see the following file to know what you have to do in this assignment Project 2, Program Design 1. College tuition and f

Project 2 Program Design Hi please see the following file to know what you have to do in this assignment Project 2, Program Design
1. College tuition and fees increase about 2% to 8% per year in the United States. Write a program that
calculates a university’s tuition and fees per credit hour for each year for the next 20 years, using the
simplifying assumption that the inflation rate will stay constant – 5% per year. The output should display
the anticipated tuition and fees per credit hour for the next 20 years. The program asks the user to enter
the college’s tuition and fees for 2018.
Example input/output:
Enter the university’s tuition and fees per credit hour for 2018 ($): 382.73
The anticipated tuition for the next 20 years:
2019: 401.87
2020: 421.96
2021: 443.06

2038: 1015.50
1) Name your program tuition.c
2) Use a for loop.
3) Format the output to print the values to 2 decimal place.
2. You are creating a new account on a website and need to come up with a username. The website
requires that a new username meets the following requirement:
a) There is a 5-15 symbol limit for the usernames.
b) It can include alphabetic letters upper or lower case, digit, period, or underscore, but no
space or any other punctuations.
Write a program that checks the username for the website.
Example Input/Output:
Enter the username: mike_FL.88
Output: valid
Enter the username: mike&FL!
Output: invalid
Enter the username: mike
Output: invalid
Enter the username: mike_tampa_Florida
Output: invalid
1) Name your program validation.c.
2) Use getchar() to read in the input. The user input ends with the user pressing the enter key
(a new line character).
Before you submit
1. Compile both programs with –Wall. –Wall shows the warnings by the compiler. Be sure it
compiles on student cluster with no errors and no warnings.
gcc –Wall tuition.c
gcc –Wall validation.c
2. Be sure your Unix source file is read & write protected. Change Unix file permission on Unix:
chmod 600 tuition.c
chmod 600 validation.c
3. Test the programs with the shell script on Unix:
chmod +x try_ tuition
./try_tuition
chmod +x try_ validation
./try_validation
4. Submit tuition.c and validation.c on Canvas>Assignments>Project 2.
Grading
Total points: 100 (50 point each program)
1.
2.
3.
4.
A program that does not compile will result in a zero for that program.
Runtime error and compilation warning 5%
Commenting and style 15%
Functionality 80%
Programming Style Guidelines
The major purpose of programming style guidelines is to make programs easy to read and understand.
Good programming style helps make it possible for a person knowledgeable in the application area to
quickly read a program and understand how it works.
1. Your program should begin with a comment that briefly summarizes what it does. This
comment should also include your name.
2. In most cases, a function should have a brief comment above its definition describing what it
does. Other than that, comments should be written only needed in order for a reader to
understand what is happening.
3. Variable names and function names should be sufficiently descriptive that a knowledgeable
reader can easily understand what the variable means and what the function does. If this is not
possible, comments should be added to make the meaning clear.
4. Use consistent indentation to emphasize block structure.
5. Full line comments inside function bodies should conform to the indentation of the code where
they appear.
6. Macro definitions (#define) should be used for defining symbolic names for numeric constants.
For example: #define PI 3.141592
7. Use names of moderate length for variables. Most names should be between 2 and 12 letters
long.
8. Use either underscores or capitalization for compound names for variable: tot_vol,
total_volumn, or totalVolumn.

Purchase answer to see full
attachment

"Order a similar paper and get 100% plagiarism free, professional written paper now!"

Order Now