辅导EEE101、讲解C/C++编程、辅导Software Engineering、C/C++程序讲解
- 首页 >> C/C++编程EEE101 C Programming and Software Engineering 1 – ASSESSMENT 1
Assessment Number 1
Contribution to Overall Marks 15%
Issue Date Monday, 8th October 2018 (Week 4)
Submission Deadline Monday, 22nd October 2018, 09:00 (Week 6)
Assessment Overview
This assessment aims at testing some basic concepts of C programming and initiates the
routine of code development using the software development process (SDP) presented in
Lecture 1, focusing on the following five steps of the software development process:
1. Problem statement: formulate the problem.
2. Analysis: determine the inputs, outputs, variables, etc
3. Design: define the list of steps (the algorithm) needed to solve the problem.
4. Implementation: the C code has to be submitted as a separate file.
Just indicate here the name of the file.
5. Testing: explain how you have tested and verified your C program.
You will need to apply this methodology to each one of the following simple exercises.
Things to note:
1. Include clear comments in your code to make it easy to understand.
2. Explain your testing procedure and what you have observed during the testing.
3. How you solved any problems.
Exercise
Write a C program that can perform the following operations:
Read the following from the keyboard and store them in appropriate variables:
1. A full name (e.g. John Smith).
2. A telephone number (e.g. 12345678900) assume all phone numbers have 11 digits.
3. A 2 digit decimal number (e.g. 22).
4. A temperature in degrees Celsius (e.g. 28.5°C).
Use a loop to add together the character values of the name entered and print the total
on the screen. (e.g. Jet Li = 74 + 101 + 116 + 76 + 105 = 472).
Divide the first 6 figures of the telephone number by the last 5 and store the result in a
variable. Print the value on the screen (e.g. 123456/78900 = 1.56.
Convert the decimal number to its binary equivalent and print it on the screen (e.g. 22
= 10110).
Convert the temperature from degrees Celsius to degrees Fahrenheit and degrees
Kelvin. Store the values in appropriate variables rounded to the closest whole number
and print them on the screen (e.g. 10°C 50°F 283°K).
What should be submitted?
You should submit the followings:
1) A short report (up to a few pages of text plus C source codes) detailing for each question:
a) SDP steps 1 to 3 in the report (Report + Specification + Analysis + Algorithm
Design) (40%)
b) SDP step 4 (Implementation + Robustness): your C source code including the
comments. (40%)
c) SDP step 5 (testing): you will explain how you have tested the correctness of your C
program and will include some sample runs of your C Programs. (20%)
Please refer to the file “EEE101 Marking Guidelines for Assignment 1” on ICE for a
detailed marking scheme.
2) The report in Microsoft Word or pdf format and C source code of your implementation
zipped into a single file, i.e. the zip file will contain 2 files. (It is good practice to include
comments in your code see the example provided.)
The naming of Report ( .doc, .docx or .pdf only), Source Code (.c) and Compressed file
(.zip, or .rar only)
StudentID_LastName_FirstName_AssignmentNumber.doc
StudentID_ AssignmentNumber.c
StudentID_LastName_FirstName_AssignmentNumber.zip
For example
Report and c source file named:
1234567_Albert_Einstein_1.doc
1234567_1.c
Contained within the zip file:
1234567_Albert_Einstein_1.zip
How the work should be submitted?
Should be submitted electronically through ICE so that the marker can run your programs
during marking. Feedback and your grade will also be given through ICE.