CSC…………md4ca

CSC md4ca.

Case assignment: your assignment is about classes & objects, classes & functions, introspection, object & object orientation and a small database project.
Required:

Don't use plagiarized sources. Get Your Custom Essay on
CSC…………md4ca
This is a Snippet Preview, get a Complete Solution Here
Order Essay

Read chapters 15, 16 from Think Python: How to Think Like a Computer Scientist (Version 1.3.3) , a reference in the background materials. Code all the examples and exercises into the Python IDLE and successfully run them. Save the final programs into Python files.
Read chapters 4 & 5 from Dive into Python, a reference in the background materials. Code all the examples and exercises into the Python IDLE and successfully run them. Save the final programs into Python files.
You ve been going to work on a database project at work for sometime now. Your boss encourages you to program the database in Python. You disagree, arguing that Python is not a database language but your boss persists by providing the source code below for a sample telephone database. He asks you to do two things: 1. Evaluate the existing source code and extend it to make it useful for managers in the firm. (You do not need a GUI interface, just work on the database aspects: data entry and retrieval of course you must get the program to run or properly work, and 2. He wants you to critically evaluate Python as a database tool.

Import the sample code below into the Python IDLE and enhance it, run it and debug it. Add features to make this a more realistic database tool by providing for easy data entry and retrieval. Export your successful program to a Python file for later upload to coursenet.
Here is the sample source code:
#!/usr/bin/python## An example from Sean Reifschneider s Python Tutorial at Linux Expo 98.## Copyright (c) 1998 Sean Reifschneider, tummy.com, ltd. # This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License# as published by the Free Software Foundation; either version 2# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place Suite 330, Boston, MA 02111-1307, USA.## You can contact Sean Reifschneider at # P.O. Box 270624, # Fort Collins, CO USA 80527-0624, # or at [email protected]## Simple phone-number database module
import shelveimport string
UNKNOWN = 0HOME = 1WORK = 2FAX = 3CELL = 4
class phoneentry:def __init__(self, name = Unknown , number = Unknown ,type = UNKNOWN):self.name = nameself.number = numberself.type = type
# create string representationdef __repr__(self):return( %s:%d % ( self.name, self.type ))
# fuzzy compare or two itemsdef __cmp__(self, that):this = string.lower(str(self))that = string.lower(that)
if string.find(this, that) >= 0:return(0)return(cmp(this, that))
def showtype(self):if self.type == UNKNOWN: return( Unknown )if self.type == HOME: return( Home )if self.type == WORK: return( Work )if self.type == FAX: return( Fax )if self.type == CELL: return( Cellular )
class phonedb:def __init__(self, dbname = phonedata ):self.dbname = dbname;self.shelve = shelve.open(self.dbname);
def __del__(self):self.shelve.close()self.shelve = None
def add(self, name, number, type = HOME):e = phoneentry(name, number, type)self.shelve[str(e)] = e
def lookup(self, string):list = []for key in self.shelve.keys():e = self.shelve[key]if cmp(e, string) == 0:list.append(e)
return(list)
# if not being loaded as a module, run a small testif __name__ == __main__ :foo = phonedb()foo.add( Sean Reifschneider , 970-555-1111 , HOME)foo.add( Sean Reifschneider , 970-555-2222 , CELL)foo.add( Evelyn Mitchell , 970-555-1111 , HOME)
print First lookup: for entry in foo.lookup( reifsch ):print %-40s %s (%s) % ( entry.name, entry.number, entry.showtype() )print
print Second lookup: for entry in foo.lookup( e ):print %-40s %s (%s) % ( entry.name, entry.number, entry.showtype() )
Add all your saved Python files from requirements 1 3 above into a zip file. Add to the zip file, a one page description of what you have accomplished and what benefits you have achieved.
Case assignment expectations:

Code all the required examples and exercises and successfully run them.
Provide a paper describing what you accomplished and what benefits you have achieved.

When your zip file is done, send it in to CourseNet.

Privacy Policy |

Contact

CSC md4ca

CourseHeroPro | CourseHeroAnswers
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.