แผนการสอน การโปรแกรมจาวา และแบบฝึกหัด

ปรับปรุง : 2550-12-06 (เพิ่ม งาน d)
CPIS 321 : การโปรแกรมจาวา (Java Programming) 3(2-2)
ศึกษาหลักการ และโครงสร้างของภาษาจากตัวแปร ค่าคงที่ ชนิดของข้อมูล ตัวดำเนินการ และนิพจน์การสร้าง และการใช้วัตถุ (Object) การเรียนรู้ชุดคำสั่งต่าง ๆ การเรียกใช้ฟังก์ชัน (Function) พื้นฐานที่มีอยู่ใน Library ของ Compiler การสร้างเงื่อนไข (Condition) การวนซ้ำ (Loop) คลาส (Class) อาร์เรย์ (Array) และแฟ้มข้อมูล (File) การใช้ GUI (Graphical User Interface)
CPSC 425, CPSC 218 : การเขียนโปรแกรมเชิงวัตถุ (Object-Oriented Programming) 3(2-2)
การเขียนโปรแกรมเชิงวัตถุเบื้องต้น การวิเคราะห์โครงสร้างของโปรแกรมเชิงวัตถุ เทคนิคเบื้องต้นของการออกแบบซอฟต์แวร์ ฟังก์ชั่นการออกแบบเชิงวัตถุขั้นพื้นฐาน การออกแบบโปรแกรมเชิงวัตถุ โปรแกรมตัวอย่าง และการฝึกปฏิบัติในห้องปฏิบัติการ
CPSC 211 : วิทยาการคอมพิวเตอร์(Computer Science) 3(2-2)
หลักการเขียนโปรแกรมแบบโครงสร้าง หลักการออกแบบโปรแกรม การแทนข้อมูลแบบต่าง ๆ นิพจน์โครงสร้างแบบบล็อก แถวลำดับ ฟังก์ชั่น และโปรแกรมย่อย โครงสร้าง และการประมวลผลแฟ้มข้อมูล แบบต่าง ๆ โครงสร้างข้อมูลเบื้องต้น การเรียกซ้ำ การเรียงลำดับ การค้นหา และการผสานข้อมูล ฝึกปฏิบัติการ เขียน และทดสอบโปรแกรมด้วยภาษาปาสคาล ภาษาซี หรือภาษาระดับสูงอื่น ๆ
แผนการสอน การโปรแกรมจาวา syloop_rit471.doc สำหรับ มหาวิทยาลัยเทคโนโลยีราชมงคล วิทยาเขตลำปาง
1. หลักการเขียนโปรแกรม
- การเขียนโปรแกรมโครงสร้าง
- หลักการพื้นฐานเกี่ยวกับคลาส (Class) และวัตถุ (Object)
- ความแตกต่างของ Java application และ Java applets 2. ตัวแปร และชนิดของข้อมูล
- ตัวแปร (Variable) แบบตัวเลข และแบบตัวอักษร
- การแปลงแบบของตัวแปร 3. การควบคุมโครงสร้างของโปรแกรม
- การทำงานแบบตามลำดับ
- การทำงานแบบเลือกตามเงื่อนไข
- การทำงานแบบทำซ้ำ 4. การรับ ประมวลผล และแสดงผล
- การรับค่าผ่าน args[] และระหว่างประมวลผล 5. โปรแกรมย่อย หรือ Method 6. การสร้าง และใช้งานคลาส (Class) แบบต่าง ๆ 7. แถวลำดับ (Array)
- แถวลำดับ (Array) หนึ่งมิติ
- แถวลำดับ (Array) สองมิติ 8. สอบกลางภาค
9. การสร้างแฟ้ม และอ่านข้อมูลเพื่อแสดงผล
10. การปรับปรุงแฟ้ม 						
- การเพิ่มข้อมูล
- การลบข้อมูล
- การแก้ไขข้อมูล 11. การค้นหาข้อมูล และการผสานข้อมูล
- การผสานข้อมูลจาก 2 แฟ้ม
- การคำนวณ และผสานข้อมูลจาก 2 แฟ้ม 12. การเรียงลำดับ 13. การวาดภาพกราฟฟิก
- การเขียนตัวอักษรแบบกราฟฟิก
- การวาดรูปทรงแบบต่าง ๆ
- การลงสี 14. การเขียนโปรแกรมเมนู และการควบคุมการรับค่า 15. สอบปลายภาค
Course Content (sl-110)
Module 1 - Java Technology Overview 
+ Describe key concepts of the Java programming language 
+ List the Java technology products used with this course 
+ Summarize each of the seven steps in the application development lifecycle  
  
Module 2 - Object-Oriented Analysis and Design 
+ Analyze a problem using object-oriented analysis 
+ Design classes from which objects will be created  
  
Module 3 - Introduction to Developing and Testing Classes 
+ Identify the parts of a class 
+ Use the main method in a test class to run a Java program from the command-line 
+ Compile and execute a Java program  
  
Module 4 - Variables 
+ Identify uses for variables and define variable syntax 
+ List the eight Java programming language primitive types 
+ Declare, set and use variables and constants according to Java[tm] programming rules and coding standards 
+ Modify variable values using operators 
+ Use promotion and casting to ensure proper storage allocation  
  
Module 5 - Objects and Object Reuse 
+ Declare, initialize, and use object reference variables 
+ Compare how object reference variables are stored in relation to primitive variables 
+ Use a class included in the Java[tm] software development kit 
+ Use the Java 2 Platform, Standard Edition API documentation to learn about other classes in the Java 2 Platform, Standard Edition API  
  
Module 6 - Operators and Decision Constructs 
+ Identify logical and boolean operators 
+ Examine the basic parts of if and if/else statements 
+ Use the switch statement  
  
Module 7 - Loop Constructs 
+ Create and identify appropriate uses for the while, for and do loops 
+ Determine when to end loop iteration using continue  
  
Module 8 - Methods 
+ Describe advantages of methods and define worker and calling method 
+ Declare and invoke a method 
+ Compare object and static methods 
+ Create overloaded methods  
  
Module 9 - Encapsulation and Constructors 
+ Use encapsulation to protect data 
+ Create constructors to initialize objects  
  
Module 10 - Arrays 
+ Define, and explain the use for, arrays 
+ Code a primitive-type single-dimension array 
+ Developing reference-type arrays 
+ Find the bounds of an array and use the bounds to set array values 
+ Create two-dimensional arrays  
  
Module 11 - Inheritance 
+ Implement inheritance and abstraction to support object-oriented reuse 
+ Include Java class libraries
งานที่มอบหมาย
งาน A : ฝึกเขียนทั้ง 6 โปรแกรม อย่างง่าย
1. ใช้ if ได้จาก j0202
2. ใช้ switch ได้จาก j0203
3. ใช้ while ได้จาก j0206
4. ใช้ BufferedReader ได้จาก j0304
5. ใช้ method ย่อยได้จาก j0402
6. ใช้ array ได้จาก j0502
และทำความคุ้นเคยกับ keywords ทั้ง 49 คำใน 9 กลุ่ม จาก http://www.thaiall.com/class/indexsign.htm
งาน B : ฝึกนำเสนอผ่านอินเทอร์เน็ต
1. ขอพื้นที่ฟรี (Free Webhosting) อย่างน้อย 2 เว็บไซต์
จาก thainame.net thcity.com geocities.com brinkster.com 1asphost.com freeservers ueuo.com
หรือ myspace.com facebook.com hi5.com หรือ multiply.com
2. แปลง Java Source Code เรื่อง Pyramid of Number จากโจทย์ใน teachpro.htm ทั้ง 36 โปรแกรม เป็น HTML
วิธีการ คือเพิ่ม <pre> บรรทัดแรกใต้ body และเปลี่ยน < เป็น &lt; ( ตัวอย่างผลงานนักเรียน)
3. มีแฟ้ม Source Code ภาษาจาวา อย่างน้อย 36 แฟ้ม ที่แปลงจากภาษาจาวา เป็น HTML
4. มีข้อมูลส่วนตัว แนะนำตนเอง หรือ Resume หรือ CV (Cover Letter)
5. Link โฮมเพจของเพื่อน และที่ตนเองสนใจ
6. รายงานประกอบด้วย ปกนอก ปกใน คำนำ สารบัญ เว็บเพจบางหน้า และ HTML ทั้งหมด
7. ขอ e-mail จากที่ว่าการอำเภอ แล้วส่ง e-mail แจ้งตำแหน่งของโฮมเพจที่ทำ
งาน C : รายงานเล็ก
รายงานประกอบด้วย ประกอบด้วย ปกนอก ปกใน คำนำ สารบัญ เลขหน้า สรุป รูปถ่ายที่ปก แสดงความคิดเห็นต่อตนเอง และการสอนของอาจารย์
1. สร้างแบบฝึกหัด เขียนศัพท์ขึ้นมา และในศัพท์ 60 คำ คำใดไม่ใช่ Keyword หรือ Reserved Word (49 Keywords) #
2. สร้างแบบฝึกหัด เขียน 10 โปรแกรม ให้แต่ละโปรแกรมมีจุดผิดพลาด 5 จุด แยกเฉลยว่าแต่ละโปรแกรมมีจุดผิดที่ใด และต้องแก้ไขอย่างไร
3. เขียน Class Diagram อย่างง่ายมา 10 Diagram แล้วเขียนโปรแกรมจาวา ตาม Diagram ทั้ง 10 นั้น #
4. เขียน 10 โปรแกรม ประกอบด้วยเรื่อง อาร์เรย์ การรับค่าจากแป้นพิมพ์ ทั้ง String และ char พร้อมแสดงผลลัพธ์ และคำอธิบายโปรแกรม
5. เขียน 10 โปรแกรม ประกอบด้วยเรื่อง substring / % max min avg tot พร้อมแสดงผลลัพธ์ และคำอธิบายโปรแกรม
งาน D : รายงานใหญ่
รายงานประกอบด้วย ปกนอก ปกใน คำนำ สารบัญ สรุปการทำงานของโปรแกรม, Print Screen, คำอธิบาย Source code และ Source code
- สร้างแฟ้มนักเรียน : id, name
- สร้างแฟ้มวิชา : subj, subjname
- สร้างแฟ้มลงทะเบียน : id, subj, grade
- ตัวแปร และชื่อโปรแกรมต้องมีชื่อสอดคล้องกับ ชื่อเล่น หรือรหัสนักศึกษา
รายละเอียดงาน
1. เขียนโปรแกรมเพิ่มข้อมูล สำหรับ 3 แฟ้ม
2. เขียนโปรแกรมลบข้อมูล สำหรับ 3 แฟ้ม
3. เขียนโปรแกรมแก้ไขข้อมูล สำหรับ 3 แฟ้ม
4. เขียนโปรแกรมอ่านข้อมูลมาแสดง สำหรับ 3 แฟ้ม
5. เขียนโปรแกรมเลือกรหัสนักเรียน แล้วแสดงวิชาที่ลงทะเบียน
6. เขียนโปรแกรมเมนู ควบคุมตัวเลือก
7. เขียนโปรแกรมแสดงประวัติของผู้เขียนโปรแกรม
8. Print Screen ทุกหน้าลงรายงาน พร้อมเขียนคำอธิบาย
9. เขียน Class Diagram แสดงการออกแบบโปรแกรม
งานที่มอบหมาย
คำใดไม่ใช่ (Keyword)
- abstract assert boolean break byte case catch char class const continue default do double else extends final finally float for goto if implements import instanceof int interface long main native new package private protected lock public return save short static strictfp super switch synchronized this throw throws transient try void volatile while
- package case catch native abstract default return new if char while this short throw throws final finally false class float else implements import instanceof save int interface do void volatile long const continue boolean for goto double lock transient break private protected try assert static strictfp public super switch extends synchronized byte
- do if transient char class static public package break default void while this switch private volatile final finally synchronized long const continue float boolean short protected super implements import for strictfp save throw throws case lock else assert instanceof abstract int catch byte extends interface native goto return double true new try
- throws throw native default volatile float const short transient class import assert return interface abstract super string extends finally double final break save continue public static synchronized catch implements protected boolean while lock strictfp switch private instanceof package void try this if goto else char do case byte long new for int
    หนังสืออ่านประกอบ
  1. ออกแบบสร้าง Game ด้วย Java, ชวัศนัช อิงชาติเจริญ
  2. Advanced Java Programming, รุ่งโรจน์ โพนคำ และปราลี มณีรัตน์
  3. การเขียนโปรแกรมเชิงวัตถุ, ผศ.ธวัชชัย งามสันติวงศ์
  4. Java programming volumne 1, ดร.วีระศักดิ์ ซึงถาวร
  5. Java ฉบับพื้นฐาน, กิตติ ภักดีวัฒนะกุล
  6. เอกสารประกอบการอบรม Java Programming Language (SL-275) ของบริษัท SUN
การประเมินผลการเรียน
คะแนนรวม ....... 100 คะแนน
จิตพิสัย ....... 10 คะแนน
โครงงานประจำวิชา ....... 10 คะแนน
การฝึกภาคปฏิบัติ .......  10 คะแนน
สอบย่อย ....... 10 คะแนน
สอบกลางภาค .......  15 คะแนน
สอบปลายภาค .......  45 คะแนน

แนะนำเว็บใหม่ : ผลการจัดอันดับ
รักลำปาง : thcity.com : korattown.com : topsiam.com : มหาวิทยาลัยโยนก
ศูนย์สอบ : รวมบทความ : ไอทีในชีวิตประจำวัน : ดาวน์โหลด : yourname@thaiall.com
ติดต่อ ทีมงาน ชาวลำปาง มีฝันเพื่อการศึกษา Tel.08-1992-7223