Vous êtes sur la page 1sur 16

ASIA PACIFIC INSTITUTE OF INFORMATION TECHNOLOGY

INCOURSE ASSIGNMENT SYSTEM DEVELOPMENT METHODS


Prepared By A.N.Ahamed Nishadh (CB004081)

Module Code & Title CE00314-2-FPCOP Cohort HF11B1SE Date of Submission 13th February 2012 Instructor Ms.Oshini Jayatunga

Submitted in partial fulfillment for the degree of Bachelor of Science (Hons) in Computing

ACKNOWLEDGEMENTS
Firstly I would like to thank my lecturer Ms.Oshini Jayatunga all the help and guidance given while doing this assignment. Also there are many individuals who have helped me in numerous ways directly and indirectly so that we were able to complete this assignment. APIIT Lanka for providing me with resources and the Tech Team at APIIT Lanka for their assistance at required times. And last but not least my friends, parents and the well-wishers without whose moral support and encouragement, I would not have been able to do a good job. Finally, if there are any shortcomings in this project, then I request to excuse me for all those and accept this documentation. Ahamed Nishadh

TABLE OF CONTENTS
1.0 - INTRODUCTION ............................................................................................... 1 1.1 PROJECT BACKGROUND ...................................................................... 1 1.2 FUNCTIONS AND FEATURES ............................................................... 1 2.0 APPLICATION OF C++ CONCEPTS ............................................................... 3 2.1 TEMPLATES ............................................................................................. 3 3.0 APPLICATION OF OOP CONCEPTS .............................................................. 4 3.1 CLASS ........................................................................................................ 4 3.2 INHERITANCE ......................................................................................... 4 3.3 ENCAPSULATION ................................................................................... 5 3.4 FUNCTION OVERLOADING AND OVERRIDING .............................. 5 4.0 VALIDATION .................................................................................................... 6 4.1 LOGIN ........................................................................................................ 6 4.2 NIC NUMBER ........................................................................................... 6 4.3 MAIN MENU SELECTION ...................................................................... 6 4.4 ADDING USER ......................................................................................... 6 4.5 ENTERING A DATE ................................................................................. 7 4.6 ENTERING VALUES FROM OTHER CLASSES ................................... 7 5.0 TEST PLAN ........................................................................................................ 8 5.1 LOGIN ........................................................................................................ 8 5.2 ADMINISTRATOR ................................................................................... 8

ii

5.3 ADMINISTRATIVE STAFF ..................................................................... 9 5.4 LECTURER ................................................................................................ 9 5.5 STUDENT .................................................................................................. 9 6.0 CLASS DIAGRAM .......................................................................................... 10 7.0 CONCLUSION ................................................................................................. 11 8.0 BIBLIOGRAPHY ............................................................................................. 12

iii

1.0 - INTRODUCTION
1.1 PROJECT BACKGROUND
For this assignment we were given the task of implementing a student grade management system using a Win32 console application. This consists of four types of users namely, administrator, administrative staff, lecturer and student who can access the system using a unique username and password and then perform the process of adding, editing, deleting, updating and viewing of records.

1.2 FUNCTIONS AND FEATURES


Function Implemented Type of user Administrator Administrative Lecturer Student Staff

Add Delete Search By Number Edit Update View Examination Reports


1

New users Marks

All records Marks

Student

Module Details

2.0 APPLICATION OF C++ CONCEPTS


2.1 TEMPLATES
Williams (2001) stated that: C++ templates are a powerful mechanism for code reuse, as they enable the programmer to write code that behaves the same for data of any type. Templates have been used in my assignment only in the file access class so that I can access various different functions in my file access class at different points when required at different times using different data types.

3.0 APPLICATION OF OOP CONCEPTS


3.1 CLASS
A C++ class definition generates a user-defined type. A class defines the characteristics of its instances in terms of members: data members (state) and member functions (methods or operations), and the visibility of these members to other classes. The class defines the form of all objects that belong to that class. Each object of the class that is created gets a copy of all the class data members, except for those declared as static. (Anon., n.d.) There are several classes in my assignment. Some of the main classes include the file access class, the login class and the separate classes for my separate types of users.

3.2 INHERITANCE
Verma (2009) stated that: Inheritance is the process of creating new classes from the existing class or classes. Using inheritance, one can create general class that defines traits common to a set of related items. This class can then be inherited (reused) by the other classes by using the properties of the existing ones with the addition of its own unique properties. The old class is referred to as the base class and the new classes, which are inherited from the base class, are called derived classes. There is one main class which is a parent class for all the user types and the user types inherit from this parent class. This is the point at which I used the concept of inheritance in my assignment.

3.3 ENCAPSULATION
Yadav (2009) stated that: The Process of combining the Data & Function in a single unit is called as Encapsulation. In the process Encapsulation the Data & Function are bundled in a single digit known as CLASS. Data is only accessible through the function present inside the Class. The programmer cant directly access the Data by using the method of Encapsulation. C++ provides the ability to define classes and functions as its primary encapsulation mechanisms with in a class, members can be declared as either public, protected, or private in order to explicitly enforce encapsulation. A public member of the class is accessible to any function. A private member is accessible only to functions that are members of that class and to functions and classes explicitly granted access permission by the class ("friends"). A protected member is accessible to members of classes that inherit from the class in addition to the class itself and any friends. Encapsulation has been used in this assignment, in the module class as this class is an independent class.

3.4 FUNCTION OVERLOADING AND OVERRIDING


Function overloading and overriding has been used in many parts of this system as this system consists of many functions that are used multiple times.

4.0 VALIDATION
4.1 LOGIN
Validations have been used at the login screen so that invalid login credentials cannot be entered by the user. If invalid data is entered an error message is displayed saying Login unsuccessful and if the data entered is correct a message saying Login successful is displayed and the user is granted access into the system.

4.2 NIC NUMBER


The validation for the national identity card number checks whether the input is string character and also sees if the last character is a V. If it is correct, it goes on to ask the next input. But if it is incorrect, an error message is displayed saying Invalid input. Please re-enter.

4.3 MAIN MENU SELECTION


The main menu consists of the different functions which are numbered and if the user enters an invalid number, the user is once again prompted to enter an existing number in the main menu. If it is a success, the user is taken to the next screen to do the specific function.

4.4 ADDING USER


In this section, when a user enters data the system makes sure that all fields are entered, if not, the user is asked to enter the details again.

4.5 ENTERING A DATE


When a date is entered into the system, the system validates it by checking it and confirming that they are correct and only when they are correct, the information is recorded. When an invalid input is entered, the system will show an error and ask the user to reenter the value.

4.6 ENTERING VALUES FROM OTHER CLASSES


When entering values from other classes, the system checks the respective files and determines if those values are available and only if they are available the system allows proceeding. Else it will give an error message and ask the user to enter the details again.

5.0 TEST PLAN


5.1 LOGIN
Test No. 1 2 3 4 5 6 7 8 7 Success or Failure Success Success Success Success Success Success Success Success Success

Test Case Administrator login with correct username & password Administrator login with username & password Administrative Staff with correct username & password Administrative Staff with incorrect username & password Lecturer login with correct username & password Lecturer login with incorrect username & password Student login with correct username & password Student login with incorrect username & password Password Mask

Expected Output Login Successful Login Failed Login Successful Login Failed Login Successful Login Failed Login Successful Login Failed * instead of input

5.2 ADMINISTRATOR
Test No. 1 2 3 4 5 6 7 8 9 Success or Failure Success Success Success Success Success Success Success Success Success

Test Case Adding new users Adding Marks Deleting Marks Deleting all records Search by student number Edit details Update details View examination reports View module details

Expected Output

5.3 ADMINISTRATIVE STAFF


Test No. 1 2 3 Success or Failure Success Success Success

Test Case Search by student number View examination reports View module details

Expected Output

5.4 LECTURER
Test No. 1 2 3 4 5 6 7 Success or Failure Success Success Success Success Success Success Success

Test Case Adding Marks Deleting Marks Search by student number Edit details Update details View examination reports View module details

Expected Output

5.5 STUDENT
Test No. 1 2 Success or Failure Success Success

Test Case View examination reports View module details

Expected Output

6.0 CLASS DIAGRAM

10

7.0 CONCLUSION
This assignment has been a real challenge to me and I have done the best I was able to in the given time. By doing this assignment, I was able to get a clear knowledge of c++ and OOP concepts and this will be useful to me later in the future.

11

8.0 BIBLIOGRAPHY
Anon., n.d. C++. [Online] Available at: http://www.objs.com/x3h7/cplus.htm [Accessed 9 February 2012]. Verma, P., 2009. Inheritance in C++. [Online] Available at: http://www.indiastudychannel.com/resources/59792-InheritanceC.aspx [Accessed 10 February 2012].

12

Vous aimerez peut-être aussi