找出指定栏位内储存数值的平均数_第1页
找出指定栏位内储存数值的平均数_第2页
找出指定栏位内储存数值的平均数_第3页
找出指定栏位内储存数值的平均数_第4页
找出指定栏位内储存数值的平均数_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Student Name: _( )AVERAGECommands 指令Meaning 解釋averagefind the average for the data stored in certain field找出指定欄位內儲存數值的平均數set default to d:use f6assignmentfoxproinstrumentlistaverage pricedefault drive is drive d預設值為磁碟機dopen instrument file 開啟檔案list out all content in the file 列出所有資料find the average

2、for the price 計出平均價格clearuse f6assignmentfoxproinstrumentlistaverage price to average_price? 'The average price of all the instrument is ', average_priceclear the screen 清除屏幕open instrument file開啟檔案list out all content in the file列出所有資料store average to memory variable average_price 將平均數儲存於av

3、erage_price 變量中print out the result 印出結果Exercise 習作:1. A table stores the following records 下表儲存七個記錄: Records#INSTRUMENTQTYPRICESUPPLIER1Guitar124000.00Metallic Music Co.2Piano48000.00Legend Music Co.3Violin52500.00Sonic Music Co.4Horn36000.00Sonic Music Co.5Sousaphone58500.00Tom Lee Music Co.6Tuba5

4、9000.00Tom Lee Music Co.7French Horn48500.00Legend Music Co.State the output of the following commands 說出下列各指令的輸出:(a) GO BOTTOM? supplier_(b) GO BOTTOMSKIP 2? instrument_(c) GO 5? Amount = , qty* price_2. A table stores the following records 下表儲存不同記錄: Records#START_DATEEND_DATE1 02/23/199902/23/2000

5、212/22/190312/22/2003307/25/199907/25/1998403/11/200104/12/2001State the output of the following commands 說出下列各記錄的輸出:(a) GO 3? RECNO()? RECCOUNT( )_(b) GO TOP? CMONTH(start_date)_SKIP? CMONTH(start_date)_(c) GO BOTTOM? end_date start_date_? DAY(end_date) DAY(start_date)_3. A table stores the followi

6、ng records下表儲存記錄如下: Records#NAMEPOSITION1Matthew WaiPrefect2Jackson ChanMonitor3Patty LamMonitor4Candy FungPrefect5Ivy LeungChairman6Grace TangPrefect7Becky CheungMonitor8Matthew WaiMonitor9Patty LamChairman10Candy FungMonitor11Grace TangChairman12Grace TangMonitor13Candy FungChairman(a) Write a com

7、mand to list the records with position equal to Monitor.寫一指令去列出Position等於Monitor 的記錄_(b) Write a command to list the names that consists of letter c.寫一指令去列出姓名names包括字母 'c' 的記錄_(c) Write a command to list the positions held by Grace Tang.寫一指令去列出Grace Tang 在學校擔當的職務positions _4. A table stores

8、the following records 表儲存下列記錄: NAMEDATE_BIRTHSEXDEPARTMENTCheung Eric04/08/1996MSalesTam William05/25/2000MPurchaseWong Brenda03/29/1998FSalesWong Robin11/26/1998MSalesLoo Cecilia08/21/2001FSalesChow Charles03/15/2002MSalesLam Maggie01/21/1997FAccountChiu George10/22/1997MPurchaseLee Henry03/22/2002

9、MSalesFung Joyce 03/04/1998FSalesChu Johnny02/18/1998MAccountMok Jennifer07/30/2002FPurchaseMok Peter08/22/1998MSalesState the results of the following commands 說出下列指令執行後的輸出:(a) LIST FIELDS name FOR on $ name_(b) LIST FIELDS name FOR sex = M AND department = Sales_(c) LIST FIELDS name FOR MONTH(date

10、_birth) = 3 OR;sex = M AND department = Sales_5. A company stores the staff information in a table with the following structure:一公司用下表的結構去儲存職員的資料:Field NameTypeWidthDecNameCharacter20Date_birthDateSexCharacter1DepartmentCharacter20DistrictCharacter20SalaryNumeric82Using the BROWSE command, write sta

11、tements to display records that satisfy the following condition.使用BROWSE指令,寫出去顯示下列條件的指令(a) staff living in a district that start with the word Tai.職員居住地區開始的字為 'Tai'_(b) staff born in the year 1982 or later.職員於1982年或以前出生_(c)staff living in a district that contains the word 'Tai'職員居住地區

12、包括 'Tai' 字_(d)male staff that born between March and August, having salary above 10000.男性職員於3月至8月間出生,及薪金為10000以上_(e)Female staff in the Sales department, who are born after 23rd July, 1984.女性職員在營業部門Sales department工作,及在1984年7月23日前出生_6. (a)Discuss the differences in the use of SET FILTER TO a

13、nd SET FIELDSTO .in Visual Foxpro說出SET FILTER TO及SET FIELDS TO 在Visual Foxpro 中的分別_ _(b) “We can use BROWSE FIELDS .instead of SET FIELDS TO." Comment on this statement."我們可以用BROWSE FIELDS 代替SET FIELDS TO" 請表達你對此指令的意見。_(c) The information of students in a school is stored in a table w

14、ith the following structure:Field NameTypeWidthDecStudCodeCharacter6ClassCharacter2ClassNoCharacter2NameCharacter20Date_birthDateSexCharacter1AddressCharacter60TelephoneCharacter10MathsNumeric62EnglishNumeric62ChineseNumeric62The fields Maths, English, and Chinese represent the marks of the students

15、 in these three subjects.欄位Maths, English 及 Chinese 代表學生在數學,英文,及中文科目的分數(i)Explain why StudCode and ClassNo are stored as character type.解釋為何StudCode 及ClassNo是以字符種類儲存_(ii)Using the command LIST, write one statement to print the average mark of the three subjects for all students. The output should in

16、clude the name and the average mark only.使用LIST指令,寫出一句指令去印出下列3科所有學生的平均分,輸出祇需包括學生姓名及平均分_(iii)Using the command BROWSE, write one statement to display the records of all male students in form 5, who are born on or before 1st Sept. 1987. You may assume that the class number for form 5 are 5A, 5B, 5C.使用BROWSE指令,寫出一句指令去顯示所有中五男生的記錄,出生日期應於1987年9月1日前,你可假設中五的班級為5A, 5B, 及5C_(iv)U

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论