Presentation is loading. Please wait.

Presentation is loading. Please wait.

VG101 RECITATION 1 By TAs. CONTENTS Intro to SAKAI Intro to APG Intro to Online Quiz System Installation of VS2005 and possible resources Some common.

Similar presentations


Presentation on theme: "VG101 RECITATION 1 By TAs. CONTENTS Intro to SAKAI Intro to APG Intro to Online Quiz System Installation of VS2005 and possible resources Some common."— Presentation transcript:

1 VG101 RECITATION 1 By TAs

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

3 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

4 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);

5 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.

6 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

7 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

8 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 x^2 should be x * x =+ should be += Missing return 0; { should be } 9 bugs !!

9 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

10


Download ppt "VG101 RECITATION 1 By TAs. CONTENTS Intro to SAKAI Intro to APG Intro to Online Quiz System Installation of VS2005 and possible resources Some common."

Similar presentations


Ads by Google