Example Java Excercise by uitmblogger


									                       | CSC238 | Object Oriented Programming | Mei2011-Sep2011 |
                               | Assignment 2 | Basic Concepts of Classes |

               Assignment 2: Basic Concepts of Classes (2.5%)
                                 Submissions: July 31, 2011, 5:00PM

CO1   Explain main concept of Object Oriented Programming – abstraction, encapsulation, inheritance            √
      and polymorphism                                                                                     √
CO2   Use Object-Oriented approach towards developing application                                              √
CO3   Use Object-Oriented approach to solve problems
CO4   Apply event-driven programming concepts using graphical user interfaces (GUI)
CO5   Solve problems using text file input-output

Question 1:
Implement a class Student. For the purpose of this exercise, a student has a name and
total score. Write a complete definition for the class with an appropriate methods
getName(), addQuiz(int score), getTotalScore(), getAverageScore() and
toString(). Write the main method to process a student. Prompt the user to enter data for
the student and number of quizzes. Determine and print the student’ grade.

Details grade are shown in the table below:

                        Score             Grade
                        100-90              A
                        89-70               B
                        79-50               C
                        49-40               D
                         39-0               E

Instruction to the students (Please read carefully and thoroughly):

1.    Submit the class diagram – hand written.
2.    Submit the hardcopy of the program – hand written.
3.    Submit the sample input and output form the running program – print screen.
4.    The Scoring Rubric for marking scheme must be attached together during submission of your
      program; otherwise NO marks will be given for your assignment.
5.    Deadline is on July 31, 2011, 5:00PM. Late submission will be penalized and marks will be


                                                                                                      Page 1
                        | CSC238 | Object Oriented Programming | Mei2011-Sep2011 |
                                | Assignment 2 | Basic Concepts of Classes |

Name                      : _______________________________________________

Student Number            : _______________________________________________
Group/Class               : _______________________________________________


Marking Scheme

                                  Weak            Moderate           Good          Excellent       Outstanding

                                    1                 2                3                4                5
 Clarity of program’s
                                             The program is clearly written as well as easy to understand.
                                                        Each of the process is documented.

                                    1                 2                3                4                5

 Algorithm of a program
                                           The algorithm of the program is capable of solving the problem
                                        completely. Apply a good indention of programming structure.
                                               There is no syntax error, logic error and run-time error.

                                    1                 2                3                4                5

 Object Oriented
 Programming concepts
                                          Apply a clearly Object-Oriented Programming concepts within the
                                                          algorithm of the program.

                                    1                 2                3                4                5
 Important required
 variables for input,
 process and output                     All input, process and output variables are clearly defined and outlined.

                                    1                 2                3                4                5

                                            The program produced expected output with correct and
                                                         presentable format.

                                                                                                             Page 2

To top