﻿<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="course.xsl" type="text/xsl" ?>
<course>
  <name-tw>物件導向程式設計(一)</name-tw>
  <name-en>Object-Oriented Programming and Operations</name-en>
  <lecture-time>15:15 - 17:55 Monday (2A, R0913)</lecture-time>
  <lecture-time>09:05 - 11:50 Wednesday (2B, R0713)</lecture-time>
  <textbook>
    <item>
      <name>Absolute Java</name>
      <amazon-url>http://www.amazon.com/exec/obidos/tg/detail/-/0321330242/qid=1125646380/sr=2-1/ref=pd_bbs_b_2_1/104-7305791-7266328</amazon-url>
      <author>Walter Savitch</author>
      <publisher-name>Addison Wesley</publisher-name>
      <publisher-url>http://www.awprofessional.com/</publisher-url>
      <isbn>0321330242</isbn>
      <agent>Kaifa Book Co.(開發)</agent>
      <publish-year>April 2005</publish-year>
    </item>
  </textbook>
  <reference>
    <item>
      <name>Java How to Program (6th Edition)</name>
      <amazon-url>http://www.amazon.com/exec/obidos/tg/detail/-/0131483986/qid=1125646588/sr=2-1/ref=pd_bbs_b_2_1/104-7305791-7266328</amazon-url>
      <author>Harvey M. Deitel, Paul J. Deitel</author>
      <publisher-name>Prentice Hall</publisher-name>
      <publisher-url>http://www.prenhall.com/</publisher-url>
      <isbn>0131483986</isbn>
      <agent>Chwa Book Co.(全華)</agent>
      <publish-year>Aug 2004</publish-year>
    </item>
  </reference>
  <lecture-notes>
    <item>
      <seq>1</seq>
      <name>Getting Started</name>
      <url>OOP.chap1.pdf</url>
    </item>
    <item>
      <seq>2</seq>
      <name>Console Input and Output</name>
      <url>OOP.chap2.pdf</url>
    </item>
    <item>
      <seq>3</seq>
      <name>Flow of Control</name>
      <url>OOP.chap3.pdf</url>
    </item>
    <item>
      <seq>4</seq>
      <name>Defining Classes I</name>
      <url>OOP.chap4.pdf</url>
    </item>
    <item>
      <seq>5</seq>
      <name>Defining Classes II</name>
      <url>OOP.chap5.pdf</url>
    </item>
    <item>
      <seq>6</seq>
      <name>Arrays</name>
      <url>OOP.chap6.pdf</url>
    </item>
    <item>
      <seq>7</seq>
      <name>Inheritance</name>
      <url>OOP.chap7.pdf</url>
    </item>
    <item>
      <seq>8</seq>
      <name>Polymorphism and Abstract Classes</name>
      <url>OOP.chap8.pdf</url>
    </item>
    <item>
      <seq>9</seq>
      <name>Exception Handling</name>
      <url>OOP.chap9.pdf</url>
    </item>
    <item>
      <seq>10</seq>
      <name>File I/O</name>
      <url>OOP.chap10.pdf</url>
    </item>
    <item>
      <seq>11</seq>
      <name>Interface and Inner Classes</name>
      <url>OOP.chap11.pdf</url>
    </item>
    <item>
      <seq>12</seq>
      <name>Collection and Iterators</name>
      <url>OOP.chap12.pdf</url>
    </item>
    <item>
      <seq>13</seq>
      <name>Threading Model</name>
      <url>OOP.chap13.pdf</url>
    </item>
  </lecture-notes>
  <exercise>
    <score>
      <name>!!! Term score list for class 2A (updated 2008/06/17) !!!</name>
      <url>AU.OOP.2a.score.pdf</url>
    </score>
    <score>
      <name>!!! Term score list for class 2B (updated 2008/06/19) !!!</name>
      <url>AU.OOP.2b.score.pdf</url>
    </score>
<!--
    <score>
      <name>!!! OOP Term Program Test Information - Class 2A !!!</name>
      <url>oop.term.program.2a.2008.pdf</url>
    </score>
    <score>
      <name>!!! OOP Term Program Test Information - Class 2B !!!</name>
      <url>oop.term.program.2b.2008.pdf</url>
    </score>
    <score>
      <name>!!! Midterm score list for class 2A (updated 2008/04/24) !!!</name>
      <url>OOP2A.2008.pdf</url>
    </score>
    <score>
      <name>!!! Midterm score list for class 2B (updated 2008/04/24) !!!</name>
      <url>OOP2B.2008.pdf</url>
    </score>
-->
    <item>
      <seq>*</seq>
      <name>Object-oriented programming concepts</name>
      <url>http://java.sun.com/docs/books/tutorial/java/concepts/index.html</url>
    </item>
    <item>
      <seq>*</seq>
      <name>JBuilder tutorial</name>
      <url>http://users.cs.dal.ca/~arc/teaching/CS2110/Tutorials/introToJBuilderTutorial.htm</url>
    </item>
<!--
    <item>
      <seq>1</seq>
      <name>Homework #1: Write a number-guessing game</name>
      <url>hw1.txt</url>
      <requirement2>Deadline: 2007/10/08, before 17:15</requirement2>
      <requirement2>Deadline: 2007/10/17, before 11:10</requirement2>
      <requirement>Write an application class with a main method ONLY.</requirement>
      <requirement>Use LOOP and BRANCH to complete your task.</requirement>
      <requirement>Use JOptionPane dialog for user interaction, including showInputDialog, showMessageDialog, and showConfirmDialog.</requirement>
      <requirement>Program will be send to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>2</seq>
      <name>Homework #2: Split a number sequence into three partitions</name>
      <url>hw2.txt</url>
      <requirement2>Deadline: 2007/10/15, before 17:55</requirement2>
      <requirement2>Deadline: 2007/10/24, before 11:50</requirement2>
      <requirement>Write an application class with a main method ONLY.</requirement>
      <requirement>Get 10 numbers from user input, split them into three sets.</requirement>
      <requirement>Each set contains equal number range from maximal and minimal input.</requirement>
      <requirement>Use LOOP and BRANCH to complete your task.</requirement>
      <requirement>Use console or dialog for user interaction.</requirement>
      <requirement>Display these sets in a single message dialog.</requirement>
      <requirement>Use JOptionPane dialog for user interaction, including showInputDialog and showMessageDialog.</requirement>
      <requirement>Program will be send to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>3</seq>
      <name>Homework #3: Write a class named "Student"</name>
      <url>hw3.txt</url>
      <requirement2>Deadline: 2007/10/22, before 17:55</requirement2>
      <requirement>Write an class with a set of private data members and a set of public methods.</requirement>
      <requirement>User can use dialog input student name, phone number and address.</requirement>
      <requirement>This class is able to show the above properties via dialog.</requirement>
      <requirement>With a main method as the starting point.</requirement>
      <requirement>Program will be send to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>4</seq>
      <name>Homework #4: Write a class named "Employee"</name>
      <url>hw4.txt</url>
      <requirement2>Deadline: 2007/10/29, before 17:10</requirement2>
      <requirement2>Deadline: 2007/10/31, before 11:50</requirement2>
      <requirement>Write an class with a set of private data members and a set of public methods.</requirement>
      <requirement>User can use dialog input employee id, name, hourly salary rate(integer number) and total working hours(double type floating point number).</requirement>
      <requirement>This class is able to show the above properties plus current salary(also a public method, as a rounded integer) via dialog.</requirement>
      <requirement>With a main method as the starting point.</requirement>
      <requirement>Program will be send to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>5</seq>
      <name>Homework #5: Write a class named "Student", part II.</name>
      <url>hw5.txt</url>
      <requirement2>Deadline: 2007/11/07, before 11:25</requirement2>
      <requirement>Write an class with a set of private data members and a set of public methods.</requirement>
      <requirement>User can use dialog input student id, name, and 3 scores: hw, midterm, and term.</requirement>
      <requirement>This class is able to show the above properties via dialog.</requirement>
      <requirement>This class is also able to show the final score (rounded integer) by the formula: 0.3*hw + 0.3*midterm + 0.4*term.</requirement>
      <requirement>With a main method as the starting point.</requirement>
      <requirement>Program will be send to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>6</seq>
      <name>Homework #6: Write a class scoring system, part I.</name>
      <url>hw6.txt</url>
      <requirement2>Deadline: 2007/11/21, before 11:50</requirement2>
      <requirement>Design a class scoring system with following features:</requirement>
      <requirement>1. Every student has attrubites: name, id number, and scores.(use input dialog to get these data)</requirement>
      <requirement>2. A socring system (ScoreSys) can store 3 times of student examination scores.</requirement>
      <requirement>3. There are 6 students in a class.</requirement>
      <requirement>4. The scoring system is able to report average score for each exmination.(use message dialog)</requirement>
      <requirement>5. The scoring system is able to report average score for each student.(use message dialog)</requirement>
      <requirement>6. The scoring system is able to report highest score and student name for each exmination.(use message dialog)</requirement>
      <requirement>7. The scoring system is able to report the count of scores below 60 for each exmination.(use message dialog)</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>7</seq>
      <name>Homework #7: Write a company employee structure, part I.</name>
      <url>hw7.txt</url>
      <requirement2>Deadline: 2007/11/28, before 11:50</requirement2>
      <requirement>Design a company employee structure(Company) with following features:</requirement>
      <requirement>1. There is one and only one general executive manager(CEO) in this company who has attrubites: name, id number, and a monthly salary number.</requirement>
      <requirement>2. Every employee(Employee) has attrubites: name, id number, a hourly salary number, and working hours count for current month.</requirement>
      <requirement>3. There are 1 CEO and 3 Employee in a company.</requirement>
      <requirement>4. This system is able to report name, id, and current salary for every kind of employee.</requirement>
      <requirement>5. This system is able to report average salary for the company.</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>8</seq>
      <name>Homework #8: Write a magazine structure.</name>
      <url>hw8.txt</url>
      <requirement2>Deadline: 2007/12/05, before 11:50</requirement2>
      <requirement>Design a magazine structure(Magazine) with following features:</requirement>
      <requirement>1. Every article(Article) has attrubites: title, a list of authors, and total pages.</requirement>
      <requirement>2. There are four articles in a magazine(Magazine).</requirement>
      <requirement>3. This magazine object is able to report titles, authors, and starting pages for each articles inside.</requirement>
      <requirement>4. This magazine object is able to report total number of pages.</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>9</seq>
      <name>Homework #9: Write a class scoring system, part II.</name>
      <url>hw9.txt</url>
      <requirement>Deadline: 2007/12/31, before 17:55</requirement>
      <requirement>Design a class scoring system as exercise #6, but with following features:</requirement>
      <requirement>1. Design a constructor for ScoreSys with argument(s) to assign number of students.</requirement>
      <requirement>2. Design a constructor for Student with argument(s) to assign number of scores.</requirement>
      <requirement>3. Use "new" method with any array in the exercise.</requirement>
      <requirement>4. Use "length" property with any array in the exercise.</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>10</seq>
      <name>Homework #10: Practice the scenario of chap6 slide page63.</name>
      <url></url>
      <requirement>Deadline: 2008/01/02, before 11:50</requirement>
      <requirement>Design a class(GradeBook) to meet the requirements of page63, with the following notes:</requirement>
      <requirement>1. Data should be input in the *main* method.</requirement>
      <requirement>2. Only a two-dimensional array should be defined in the class.</requirement>
      <requirement>3. Report studentAverage(i) and quizAverage(i).</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
-->
    <item>
      <seq>1</seq>
      <name>Homework #1: Write a class scoring system, part III.</name>
      <url>hw1.txt</url>
      <requirement>Deadline: 2008/03/05, before 11:50</requirement>
      <requirement>Design a class scoring system with following features:</requirement>
      <requirement>1. There is one and only one teacher in this class who has attrubites: name, id number, and a course name.</requirement>
      <requirement>2. Every student has attrubites: name, id number, and 3 times of examination scores.</requirement>
      <requirement>3. Since student and teacher share some common attributes, a base class named "SchoolMember" should be designed, and Student and Teacher class should inherit this base class.</requirement>
      <requirement>4. There are 1 teacher and 3 students in a class.</requirement>
      <requirement>5. The scoring system is able to report teacher's name, id, and course name.</requirement>
      <requirement>6. The scoring system is able to report every student's name, id, and average score.</requirement>
      <requirement>7. The scoring system is able to report average score for each exmination.</requirement>
      <requirement>8. The scoring system is able to report average score for each student.</requirement>
      <requirement>9. The scoring system is able to report highest score and student name for each exmination.</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>2</seq>
      <name>Homework #2: Write a company employee structure.</name>
      <url>hw2.txt</url>
      <requirement>Deadline: 2008/03/12, before 11:50</requirement>
      <requirement>Design a company employee structure(Company) with following features:</requirement>
      <requirement>1. There is one and only one general executive manager(CEO) in this company who has attrubites: name, id number, and a monthly salary number.</requirement>
      <requirement>2. Every constant employee(Clerk) has attrubites: name, id number, and a monthly salary number.</requirement>
      <requirement>3. Every temporary employee(Temp) has attrubites: name, id number, a hourly wage rate, and a hour count for current month.</requirement>
      <requirement>4. Since every employee share some common attributes, a base class named "Employee" should be designed, and CEO/Clerk/Temp should inherit this base class.</requirement>
      <requirement>5. But also since this company originally has monthly salaried employees only, so the base class "Employee" has defined monthly salary already.</requirement>      
      <requirement>6. There are 1 CEO, 2 Clerk and 2 Temp in a company.</requirement>
      <requirement>7. This system is able to report name, id, and current salary for every kind of employee using toString method.</requirement>
      <requirement>8. Set your data coded in main instead of getting from user.</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>3</seq>
      <name>Homework #3: Write a number-guessing game, part II.</name>
      <url></url>
      <requirement>Deadline: 2008/04/02, before 11:50</requirement>
      <requirement>Write number-guessing game.</requirement>
      <requirement>Use LOOP and BRANCH to complete your task.</requirement>
      <requirement>Use Math.random() to generate an answer range from 1 to 100.</requirement>
      <requirement>You should demo how to catch input incorrect exception and number out of range exception.</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>4</seq>
      <name>Homework #4: Exception exercise.</name>
      <url></url>
      <requirement>Deadline: 2008/04/30, before 11:50</requirement>
      <requirement>Design an exception handling scenario with following features:</requirement>
      <requirement>1. An integer divider class(Divider) which can compute quotient(getQuotient()) and remainder(getRemainder()).</requirement>
      <requirement>2. An exception class(DividerException) for divide by zero exception.</requirement>
      <requirement>3. This exception should report why user input wrong information(dividend, divider).</requirement>
      <requirement>4. A demo class(Demo) for getting user input (use JOptionPane) and output for demonstration of the above exception handling scenario.</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>5</seq>
      <name>Homework #5: File read/write exercise.</name>
      <url>input.txt</url>
      <requirement>Deadline: 2008/05/14, before 11:50</requirement>
      <requirement>Design a score calculation according to the following features:</requirement>
      <requirement>1. A file named "input.txt", which contains student scores for all students in a class.</requirement>
      <requirement>2. Each row represents a single student's scoring record.</requirement>
      <requirement>3. Each column (except the first one) represents a single exam.</requirement>
      <requirement>4. Please calculate student's average and exam's average and put the average score as an additional row/column.</requirement>
      <requirement>5. Output the file named "output.txt".</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>6</seq>
      <name>Homework #6: Write a garden with flowers, butterflies, Vector version.</name>
      <url>hw6.zip</url>
      <requirement>Design a garden with following features:</requirement>
      <requirement>1. Garden class: contains flowers and butterflies.</requirement>
      <requirement>2. Flower class should contain floral color attribute.</requirement>
      <requirement>3. Butterfly class should contain wing color attribute.</requirement>
      <requirement>4. Garden contains some flowers, some bees and some butterflies, which is hold by a single Vector.</requirement>
      <requirement>5. The garden should be able to report its contents using toString method.</requirement>
    </item>
    <item>
      <seq>7</seq>
      <name>Homework #7: Write a garden with flowers, butterflies, bees, object file version.</name>
      <url>hw7.zip</url>
      <requirement>Design a garden with following features:</requirement>
      <requirement>1. Garden class: contains flowers, butterflies, and bees.</requirement>
      <requirement>2. Flower class should contain floral color attribute.</requirement>
      <requirement>3. Butterfly class should contain wing color attribute.</requirement>
      <requirement>4. Bee class should contain body color attribute.</requirement>
      <requirement>5. Garden contains some flowers, some bees and some butterflies, which is hold by a single Vector.</requirement>
      <requirement>6. Save the whole garden in a file named "garden.obj" and read it back, then report the whole garden.</requirement>
    </item>
<!--
    <item>
      <seq>8</seq>
      <name>Homework #8: Write a government employee structurem, part II.</name>
      <url></url>
      <requirement2>Deadline: 2005/12/16, before 16:30</requirement2>
      <requirement2>Design a government employee structure(Administration) with following features:</requirement2>
      <requirement2>1. All HW7 features should be included, but with the following modifications.</requirement2>
      <requirement2>2. Every kind of person should use "Person" class to keep boss/subordinate relationships.</requirement2>
      <requirement2>3. The methods "getSalary", "getBoss" and "getSubordinate" should be designed in Person class showing the effect of late binding.</requirement2>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
    <item>
      <seq>9</seq>
      <name>Homework #2: Write a number-guessing game, part II.</name>
      <url>hw9.txt</url>
      <requirement>Deadline: 2005/12/23, before 16:30</requirement>
      <requirement>Write number-guessing game.</requirement>
      <requirement>Use LOOP and BRANCH to complete your task.</requirement>
      <requirement>Use Math.random() to generate an answer range from 1 to 1000.</requirement>
      <requirement>You should demo how to catch input incorrect exception and number out of range exception.</requirement>
      <requirement>Program will be presented to TA by YOURSELF.</requirement>
    </item>
-->
 </exercise>
</course>
