中国高校课件下载中心 》 教学资源 》 大学文库

上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Recitation Notes_Recitation 1

文档信息
资源类别:文库
文档格式:PPT
文档页数:10
文件大小:822KB
团购合买:点击进入团购
内容简介
上海交通大学:《程序设计基础》课程教学讲义(密西根学院)Recitation Notes_Recitation 1
刷新页面文档预览

VG101 RECITATION 1 By TAs

VG101 RECITATION 1 By TAs

CONTENTS o Intro to SAKAI o Intro to APG o Intro to Online Quiz System o Installation of VS2005 and possible resources o Some common mistakes oQ&A

CONTENTS  Intro to SAKAI  Intro to APG  Intro to Online Quiz System  Installation of VS2005 and possible resources  Some common mistakes  Q&A

INTRO TO SAKAL o http:l/202.120.46.185:8080 portal user name (EID)and password (by default,it is your student ID) o Important folders:Announcements,Resources, Assignments o Check SAKAI at least once a day

INTRO TO SAKAI  http://202.120.46.185:8080/portal  user name (EID) and password (by default, it is your student ID)  Important folders: Announcements, Resources, Assignments  Check SAKAI at least once a day

INTRO TO APG o http:/202.120.46.189:8080/apgl user name (EID)and password (by default,it is 1234567,so change you password ASAP) o Using Tags write console.printLine(",answer,""); instead of console.printLine(answer);

INTRO TO APG  http://202.120.46.189:8080/apg/  user name (EID) and password (by default, it is 1234567, so change you password ASAP)  Using Tags write console.printLine(“” , answer, “”); instead of console.printLine(answer);

INTRO TO APG 1.Use EID and password to Username:xiaobo Passw0rd:e00●e● login Do not have an account? Login Copyright (c)2008 APG Development Team.All rights reserved. Problems Status Account Logout Help 2.Select an assignment. Course No Title Start End Score 3.Click its title to go to Test 1 Hello World 2028-08-142008-09-14 22:37:41.022:37:41.0 100.0/100PA85 assignment description. Test 2 A+B Problem 2008-08-142008-09-14 2240:12.02240:12.0 100.0/100Pa83 Test 3 Sorting Numbers 2008-08-142008-09-14 23:47:47.02347:47.0 100.0/100PA85 4.Paste code there and submit

INTRO TO APG 1. Use EID and password to login 2. Select an assignment. 3. Click its title to go to assignment description. 4. Paste code there and submit

INSTALLATION OF VS2005 New Project Project types: Templates: 曰-Visual C# Yisual Studio installed templates Windows Smart Device CS106B/X C++Assignment Wizard Custom Wizard Database Windows Ferms Applicatien CLR Console App Starter Kits Win32 Console Application ATL Project 白-Other Languages MFC Application Makefile Project 中-Visual Basic ASP.NET Web Service ATL Server Projec ⊕isual1求 ATL Server Web Service ▣ATL Smart Device 中-Visual C++ 的Class Library CLR Empty Projec 中-Other Project Types Empty Project MFC ActiveX Cont 2005 Microsoft Corporation. 2005 Microsoft Corporation All rights reserved. All rights reserved

INSTALLATION OF VS2005  Make sure that you have a right version click Help -> about Microsoft Visual Studio  Use the CS106B/X template to create a new project click File -> New -> Project  For detailed steps, look up your lab meterials

SOME COMMON MISTAKES include Vg101class.h include How many bugs can you find? 1~10 int main(void) { double x,y,z x=console.readDouble("Please enter a number:") y=console.readDouble("/nPlease enter a second number:") z=X^2; z=+y*y; console.printLine("/nThe answer is "sqrt(z));

SOME COMMON MISTAKES include Vg101class.h include int main (void) { double x, y, z x = console.readDouble("Please enter a number: "); y = console.readDouble(“/nPlease enter a second number: "); z = x^2; z =+ y * y; console.printLine(“/nThe answer is " , sqrt(z)); { How many bugs can you find? 1~10

Missing Missing # 699 MISTAKES #include "Vg101class.h" #include 9bugs1! Missing vo] declaration Missing; /n should be\n ouble x,y,Z; eT console; =should be + sole.readDouble("Plase enter a number:") dsole.readDouble("\nPlease enter a second number: Z=x*x; x^2 should be xx z+=y *y; console.printLine("\nThe answer is "sqrt(z)); return 0; Missing should /n should return 0; be be\n

SOME COMMON MISTAKES #include "Vg101class.h" #include int main (void) { double x, y, z; ConsoleT console; x = console.readDouble("Please enter a number: "); y = console.readDouble("\nPlease enter a second number: "); z = x * x; z += y * y; console.printLine("\nThe answer is " , sqrt(z)); return 0; } Missing # Missing ; Missing declaration Missing “” /n should be \n /n should be \n x^2 should be x * x =+ should be += Missing return 0; { should be } 9 bugs !!

SOME COMMON MISTAKES 05%2=?5/2=? 0-5%2=?-5/2=? 0-5%-2=?-5/-2=? int main (void) CA Press [Enter]tott ConsoleT c; -5%-2=-1 c.printLine-5%-2=",-5%-2,"n-5/-2=",-5/-2): -5/-2=2 return 0; o Write your own program to find them o Remember:(x/y)*y+(x%y)=x o The answers are:1,2,-1,-2,-1,2

SOME COMMON MISTAKES  5 % 2 = ? 5 / 2 = ?  -5 % 2 = ? -5 / 2 =?  -5 % -2 = ? -5 / -2 = ?  Write your own program to find them  Remember: (x/y) * y + (x%y) = x  The answers are: 1, 2, -1, -2, -1, 2

Thanks! Q&A

已到末页,全文结束
刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档