Home Page

Milestone 6: Basic Data Structures
Arrays & Records


You may refer to the textbook. You may not use: (1) Handphones (2) Internet (3) Discussion or Talking. 這個里程碑是開放的。 您不得使用:(1) 手機 (2) 網路 (3) 討論或交談。 The test is 30 minutes.

Your
Name
Your
ID
Mentor
Name
Mentor
ID
Instructions 说明
  1. Prepare a UML diagram 准备UML活动图
  2. Code algorithm in C. 用C语言编写算法。
  3. Compile, Link, Run & Debug 编译、链接、运行和调试
  4. Do not shut down the computer(TA will check)不要关闭计算机(助教将检查)
Your program must: 您的程序必须:
  1. Compile without errors or warnings 编译、链接和运行,无错误或警告
  2. Do the calculation correctly.正确进行计算
  3. Use functions as specified in the problem definition.使用问题定义中指定的函数。
  4. Employ quality coding style.采用高质量的编码风格。
Task: Write a function to reverse the elements of an array. Your program should prompt the user to enter the elements of an array. (b) Call a function to reverse the order of the elements and place them in a new array (c) Print the result (d) Demonstrate the function working for an array of size 8. 任務:寫一個函數來反轉數組的元素。(a)應提示使用者輸入數組的元素。 (b)呼叫函數來反轉元素的順序並將它們放入新數組中(c)列印結果(d) 示範適用於8個元素的陣列的函數
Screen shot (user input is bold)
c:\sdba>reverse
Input array to be reversed>1,2,3,4,5,6,7,8
Output array is: 8,7,6,5,4,3,2,1
ItemWCHK
UML  1    
Clean Code  1    
Compile  1    
Link  1    
Run  1    
Correct 1        
Functions 1    

⇒ Draw your UML here. 在这里绘制你的通用建模语言活动图 0


1


2


3


4