Beruflich Dokumente
Kultur Dokumente
Instructions to Candidates:
1. Follow the class diagram strictly. Read the problem statement, functionality and the other
details provided carefully and implement the solution
2. Ensure that all the constructors are public and DO NOT change the prototype of the
constructor and the methods
3. Code submitted with compilation errors may not get evaluated
4. The coding standards are mandatory wherever applicable
Guidelines:
1. This assessment is intended to test the hands on skills related to Programming and Database
Connectivity using Python
2. You must use Eclipse, cx_Oracle and Oracle 11g Express Edition for implementing
NOTE: NOT adhering to the above instructions and guidelines may lead to drastic reduction in your score
even if the code is executing without any errors
Class Diagram
Database: Implement the above class diagram and connect it with database tables to maintain customer
details. Validate the customer details and Demo (Main class) must have the option to select for
manipulating with database like insert/modify/delete/search.
Table Structure:
Address:
Customer:
Note:
Implementation Details:
Class: Customer
Add code to Customer based on the class diagram and the additional implementation details are given
below.
Constructor
validatetelephoneno()
This method validates the telephoneno member variable and returns a boolean value
telephoneno must be validated for 12 digits (including country code eg: 91) and also the first 2
digits must match with our country code (91).
This method returns true if the value of telephoneno is valid, otherwise it must return false
Python DB Integration Project
calculateCustomerType()
Add code to Regular Customer based on the class diagram and use Customer as parent class. Additional
implementation details are given below.
Constructor
calculateDiscount()
displayCustomerInformations()
Add code to Privileged Customer based on the class diagram and use Customer as parent class. Additional
implementation details are given below.
Constructor
calculateMemberCardType()
displayCustomerInformations()
Prints all the details of the Customer and Address details must be printed, if the customer
need the products to be home delivered.
Class: Address
Add code to Address based on the class diagram. Wherever needed, the additional implementation details
are given below.
Constructor:
Use parameterized constructor to initialize addressline, city, zipcode and state. Auto-generated
number must be given for addressid.
validatezipcode ():
This method validates the zipcode member variable and returns a boolean value
zipcode must be validated for 6 digits
This method returns true if the value of zipcode is valid, otherwise it must return false
Demo Class: