Free Essay

Object-Oriented Programming Mini Projects

In:

Submitted By rock244man
Words 1078
Pages 5
MANAGEMENT DEVELOPMENT INSTITUTE OF SINGAPORE

Advanced Diploma in Information technology
AITD2 1422A_AITD2 1421A_AITD2 1420A_AITD2 1419A

Objected-oriented Programming

Mini Project Question (100 marks)

In this project, you will be creating new classes that are derived from a class called
BankAccount.

A checking account is a bank account and a savings account is a bank account as well.

This sets up a relationship called inheritance, where BankAccount is the superclass and CheckingAccount and SavingsAccount are subclasses.

This relationship allows CheckingAccount to inherit attributes from BankAccount (like owner, balance, and accountNumber), but it can have new attributes that are specific to a checking account, like a fee for clearing a check.

It also allows CheckingAccount to inherit methods from BankAccount, like deposit, that are universal for all bank accounts.

You will write a withdraw method in CheckingAccount that overrides the withdraw method in BankAccount, in order to do something slightly different than the original withdraw method.

You will use an instance variable called accountNumber in SavingsAccount to hide the accountNumber variable inherited from BankAccount.

The UML diagram for the inheritance relationship is as follows:

[pic]

Task #1 Extending BankAccount

1. Copy the files AccountDriver.java and BankAccount.java from the Blackboard. BankAccount.java is complete and will not need to be modified.

2. Create a new class called CheckingAccount that extends BankAccount.

3. It should contain a static constant FEE that represents the cost of clearing one check. Set it equal to 15 cents.

4. Write a constructor that takes a name and an initial amount as parameters. It should call the constructor for the superclass. It should initialize accountNumber to be the current value in accountNumber concatenated with –10 (All checking accounts at this bank are identified by the extension –10). There can be only one checking account for each account number. Remember since accountNumber is a private member in BankAccount, it must be changed through a mutator method. 5. Write a new instance method, withdraw, that overrides the withdraw method in the superclass.

This method should take the amount to withdraw, add to it the fee for check clearing, and call the withdraw method from the superclass.

Remember that to override the method, it must have the same method heading. Notice that the withdraw method from the superclass returns true or false depending if it was able to complete the withdrawal or not. The method that overrides it must also return the same true or false that was returned from the call to the withdraw method from the superclass.

6. Compile and debug this class.

Task #2 Creating a Second Subclass

1. Create a new class called SavingsAccount that extends BankAccount.

2. It should contain an instance variable called rate that represents the annual interest rate. Set it equal to 2.5%.

3. It should also have an instance variable called savingsNumber, initialized to 0. In this bank, you have one account number, but can have several savings accounts with that same number. Each individual savings account is identified by the number following a dash. For example, 100001-0 is the first savings account you open, 100001-1 would be another savings account that is still part of your same account.

This is so that you can keep some funds separate from the others, like a Christmas club account.

4. An instance variable called accountNumber that will hide the accountNumber from the superclass, should also be in this class.

5. Write a constructor that takes a name and an initial balance as parameters and calls the constructor for the superclass. It should initialize accountNumber to be the current value in the superclass accountNumber (the hidden instance variable) concatenated with a hyphen and then the savingsNumber.

6. Write a method called postInterest that has no parameters and returns no value. This method will calculate one month's worth of interest on the balance and deposit it into the account.

7. Write a method that overrides the getAccountNumber method in the superclass.

8. Write a copy constructor that creates another savings account for the same person. It should take the original savings account and an initial balance as parameters. It should call the copy constructor of the superclass, assign the savingsNumber to be one more than the savingsNumber of the original savings account. It should assign the accountNumber to be the accountNumber of the superclass concatenated with the hypen and the savingsNumber of the new account.

9. Compile and debug this class.

10. Use the AccountDriver class to test out your classes. If you named and created your classes and methods correctly, it should not have any difficulties. If you have errors, do not edit the AccountDriver class. You must make your classes work with this program.

Running the program should give similar output as shown below:

Account Number 100001-10 belonging to Benjamin Franklin

Initial balance = $1000.00
After deposit of $500.00, balance = $1500.00
After withdrawal of $1000.00, balance = $499.85

Account Number 100002-0 belonging to William Shakespeare

Initial balance = $400.00
After deposit of $500.00, balance = $900.00
Insuffient funds to withdraw $1000.00, balance = $900.00
After monthly interest has been posted, balance = $901.88

Account Number 100002-1 belonging to William Shakespeare

Initial balance = $5.00
After deposit of $500.00, balance = $505.00
Insuffient funds to withdraw $1000.00, balance = $505.00

Account Number 100003-10 belonging to Isaac Newton

Guidelines for the Project :-

1. This is a group project (3 to 4 persons per group)

2. This mini project is worth 40% of the final mark for the OOP module.

3. Your code must be sent via email and submitted to the lecturer on or before 19th December, 2014.

4. You are also required to show a demo of the program on the date of submission.

5. Viva voce will be conducted on 19th December.

Performance Criteria

|Grading Criteria |Marks Allotted |Marks Scored |
|Part 1: Requirement Analysis (10 Marks) |
|Understanding the Problem |5 | |
|Part 2: Design (20 Marks) |
|Use of Appropriate Classes & Methods |10 | |
|Use of Appropriate Data Types & Variables |10 | |
|Part 3: Coding (40 Marks) |
|Program Logic |10 | |
|LOC (Lines of Code) |10 | |
|Efficient Usage of Statements |10 | |
|Indentation & Comments |10 | |
|Part 4: Execution (20 Marks) |
|Output as Expected |10 | |
|Free from Syntax, Logical & Runtime Errors |10 | |
| |
|Part 5: Viva(10 Marks) |15 | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
|Total Marks |100 | |

Important Note: Be sure to acknowledge the sources of your information.

Plagiarism is not allowed. You will be penalized if found guilty.

Similar Documents

Premium Essay

Geting It Together

...approach. The second important concept is that there are two types of development methodologies—a structured approach and an object-oriented approach. These are two separate concepts. Projects can be any mix of these two approaches, the approach to the life cycle and the approach to the methodology—predictive with structured, predictive with object-oriented, adaptive with structured, or adaptive with object-oriented. The chapter first presents and explains the differences in the life cycle approach—the predictive and the adaptive approaches. These two approaches are really a continuum and any give project may have elements of both approaches. The predictive approach to the SDLC is used for projects that are well understood and low risk. The adaptive approach to the SDLC is used for projects that are not well understood and are higher risk. Adaptive SDLCs are more iterative and allow the project team to adapt the project to changing circumstances. The other important concept that you should learn from this chapter are the difference between the two main methodologies to system development that are currently used to develop business systems: the structured approach and the object-oriented approach. The object-oriented approach refers to system development using newer object technologies that require a different approach to analysis, design, and programming. Finally the chapter concludes with a discussion of the Agile philosophy and Agile...

Words: 3771 - Pages: 16

Free Essay

With the Development of Technology, More and More Robots Are Used in Various Fields,

...University of Mumbai B.E Information Technology Scheme of Instruction and Evaluation Third Year -Semester VI Scheme of Instructions Sr. Subjects Lect/ No 1 Information and Network Security Middleware and Enterprise Integration Technologies Software Engineering Data Base Technologies Programming for Mobile and Remote Computers Information Technology for Management of Enterprise TOTAL Week 4 Scheme of Examinations Theory T/W Practical Oral Total Hours Marks Marks Marks Marks Marks 3 100 25 -25 150 Pract/ Week 2 Tut/ Week -- 2 4 2 -- 3 100 25 -- 25 150 3 4 5 4 4 4 2 2 2 ---- 3 3 3 100 100 100 25 25 25 --25 25 25 -- 150 150 150 6 4 24 10 1 1 3 -- 100 600 25 150 -25 25 125 150 900 INFORMATION AND NETWORK SECURITY CLASS T.E. ( INFORMATION TECHNOLOGY) HOURS PER LECTURES : WEEK TUTORIALS : PRACTICALS EVALUATION SYSTEM: THEORY PRACTICAL ORAL TERM WORK : SEMESTER VI 04 -02 HOURS 3 ---- MARKS 100 25 25 1. Introduction What is Information Security? Security Goals. 2. Cryptography Crypto Basic, Classic Cryptography, Symmetric Key Cryptography: Stream Ciphers, A5/1, RC4, Block Ciphers, Feistel Cipher, DES, Triple DES, AES, Public Key Cryptography: Kanpsack, RSA, Defiie-Hellman, use of public key crypto- Signature and Non-repudiation, Confidentiality and Non-repudiation, Public Key Infrastructure, Hash Function: The Birthday Problem, MD5, SHA-1, Tiger Hash, Use of Hash Function. 3. Access...

Words: 3868 - Pages: 16

Premium Essay

Accounts Receivable Management

...CHAPTER 2 SYSTEM DEVELOPMENT LIFE CYCLE TYPES OF INFORMATION SYSTEM Transaction Processing Systems A transaction processing system provides a way to collect, process, store, display modify or cancel transactions. Most of these systems allow multiple transactions to take place simultaneously. The data that this system collects is usually stored in databases which can be used to produce reports such as billing, wages, inventory summaries, manufacturing schedules, or check registers. Management Information Systems A management information system is an information system that uses the data collected by the transaction processing system and uses this data to create reports in a way that managers can use it to make routine business decisions in response to problems. Some of the reports that this information system creates are summary, exception and ad hoc reports. All this is done to increase the efficiency of managerial activity. Decision Support Systems A decision support system helps make decisions by working and analyzing data that can generate statistical projections and data models. This system gives support rather than replacing a managers judgement while improving the quality of a managers decision. A DSS helps solve problems while using external data. Expert Systems and Neutral Networks An expert system, also known as a knowledge-based system, is a computer system that is designed to analyze data and produce recommendations, diagnosis and decisions that are controlled...

Words: 1013 - Pages: 5

Premium Essay

Essay On My Passion For Learning

...I am being constantly motivated by my thirst to master the subject I have published another paper on A Review Of Low Cost Object Tracking System in IJCSET (ISSN 2231-0711). This paper proposes and implements a low cost object tracking system using GPS and GPRS and GIS using HTTP protocol. A web application is developed using PHP, JavaScript. Working on these, I came to know how we can control the devices using programming skills. Through these, interest towards programming has been infused in...

Words: 942 - Pages: 4

Free Essay

Project Management for the Central Goverment

...1.3 Advantages…………………..……………………………………………...............................3 1.4 Objective …………………………………………………………………………………………..…....4 1.5 Scope…………………….……………………………………………………………………….………….4 2. FEATURES OF PROJECT…………………………………………………………………………….5 3. HARDWARE & SOFTWARE REQUIREMENTS 3.1 Input Requirements…………………………………….……………………………………..8 3.2 Output Requirements………………………………………………………………………..8 3 3.3 Software Requirements…………………….………………………………………………..8 3.4 Hardware Requirements……………………………………………………………………..8 4. TOOL USED FOR DEVELOPMENT 4.1 NetBeans…………………………………………………………………………….……………….10 4.1.1 Features and Tools…………………..……………………………..………..…….10 4.1.2 Source Code Editor………………………………………………………………….10 4.1.3 GUI Builder………………………………………………………………………………..11 5. TECHNOLOGY TO BE USED 5.1 Introduction to Java…………………………………………………………..……………..13 5.1.1 Java Virtual Machine……………………………………………….…………..13 5.1.2 Principles………………………………………………………………………………..13 5.1.3 Versions……………………………………….………………………………………...14 5.1.4 Features of Java Language…………………………………………………..14 5.2 Multi Threading………………………………………………………………………….........16 5.2.1 Benefits of using threads……………………………………………………..17 5.2.2 Life Cycle of a Thread……………………………………………………………17 5.2.3 Thread Priority in Java………………………………………………………….18 5.3 Socket Programming in Java……….…………………………………………………..19 5.3.1 Ports and...

Words: 12882 - Pages: 52

Premium Essay

It and Its Scope

...UNIVERSITY OF MUMBAI Bachelor of Engineering Information Technology (Third Year – Sem. V & VI) Revised course (REV- 2012) from Academic Year 2014 -15 Under FACULTY OF TECHNOLOGY (As per Semester Based Credit and Grading System) University of Mumbai, Information Technology (semester V and VI) (Rev-2012) Page 1 Preamble To meet the challenge of ensuring excellence in engineering education, the issue of quality needs to be addressed, debated and taken forward in a systematic manner. Accreditation is the principal means of quality assurance in higher education. The major emphasis of accreditation process is to measure the outcomes of the program that is being accredited. In line with this Faculty of Technology of University of Mumbai has taken a lead in incorporating philosophy of outcome based education in the process of curriculum development. Faculty of Technology, University of Mumbai, in one of its meeting unanimously resolved that, each Board of Studies shall prepare some Program Educational Objectives (PEO‟s) and give freedom to affiliated Institutes to add few (PEO‟s) and course objectives and course outcomes to be clearly defined for each course, so that all faculty members in affiliated institutes understand the depth and approach of course to be taught, which will enhance learner‟s learning process. It was also resolved that, maximum senior faculty from colleges and experts from industry to be involved while revising the curriculum. I am happy to state...

Words: 10444 - Pages: 42

Premium Essay

Hotel Management System

...ONLINE HOTEL MANAGEMENT Mini Project Report On 2010 ONLINE HOTEL MANAGEMENT In the partial fulfillment of 4th semester of MCA By Priyesh Kumar Regn_no:95580034 DEPARTMENT OF COMPUTER APPLICATIONS COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY COCHIN -22 PRIYESH KUMAR, DCA, CUSAT, Kochi-22 1 ONLINE HOTEL MANAGEMENT CERTIFICATE 2010 COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY COCHIN-22 This is to certify that the project report entitled “ONLINE HOTEL MANAGEMENT” is a bonafide record of the work done by PRIYESH KUMAR (Regno.95580034) As The M.C.A 4TH semester Mini project.. JUNE 2010 ______________ Internal Examiner ______________ Head of the Department Submitted on: ______________ PRIYESH KUMAR, DCA, CUSAT, Kochi-22 2 ONLINE HOTEL MANAGEMENT CONTENTS  ACKNOWLEDGEMENT  SYNOPSIS 1. INTRODUCTION 1.1. OBJECTIVE 1.2.PROBLEM DEFINITION 1.3. SYSTEM ENVIRONMENT 2. SOFTWARE QUALITY ASSURANCE PLAN 2.1. PURPOSE 2.2. SCOPE 2.3. DOCUMENT OVERVIEW 2.4. TASKS 2.5. IMPLEMENTATION 2.6. DOCUMENTATION 2.7. AUDIT 2.8. SOFTWARE DEVELOPMENT PROCESS 2.9. DOCUMENT REVIEW 2.10 TESTING 3. SYSTEM ANALYSIS 3.1 SYSTEM STUDY 3.2FEASIBILITY STUDY 2010 PRIYESH KUMAR, DCA, CUSAT, Kochi-22 3 ONLINE HOTEL MANAGEMENT 4. SOFTWARE REQUIREMENTS SPECIFICATION 2010 4.1User Interface Requirements 4.2Database Requirements 4.3Functional Requirements 4.4Non-Functional Requirements 4.5Other Requirements and Constraints 5. SYSTEM DESIGN 5.1 ARCHITECTURAL DESIGN 5.2 PROCESS DESIGN 5.3 ER-DIAGRAMS 6. DATA...

Words: 7751 - Pages: 32

Free Essay

Syllabus

... | | | | | | |Theory |Sessional* | | |MCA-101 |Computer Fundamentals and Problem Solving Using C |3 Hours |80 |20 |100 | |MCA-102 |Computer Organisation |3 Hours |80 |20 |100 | |MCA-103 |Discrete Mathematical Structures |3 Hours |80 |20 |100 | |MCA-104 |Software Engineering |3 Hours |80 |20 |100 | |MCA-105 |Computer Oriented Numerical and Statistical Methods |3 Hours |80 |20 |100 | |MCA-106 |Software Laboratory - I |3 Hours | | |100 | | |C (Based on MCA-101) | | | | | |MCA-107 |Software Laboratory – II |3 Hours | | |100 | | |C (Based on MCA-105) | | | | | |MCA-108 |Seminar...

Words: 13848 - Pages: 56

Premium Essay

System Development Life Cycle

...significance of system changes has increased. Moreover, many specialists now need certain skills in the analysis, understanding, and evaluation of the system development and evolution processes. Systems are created to solve problems. Early systems development often took place in a rather chaotic and haphazard manner, relying entirely on the skills and experience of the individual people members performing the work. The history of systems development has a different fundamental change agent, a different factor which may be thought of as driving the history, of stimulating long-run changes. All system development efforts engage in some combination of the below tasks, System conceptualization, System requirements and benefits analysis, Project adoption and project scoping, System design, Specification of software requirements, Architectural design, Detailed design, Unit development, Software integration and testing, System integration and testing, Installation at site, Site testing and acceptance, Training and documentation, Implementation and Maintenance. System Development in the 1950s In this period will be that there was any form of systems prior to the advent of the computer. Organizations predated the computer by several years. Such Organizations were concerned with the design of major business processes using work measurement and...

Words: 4408 - Pages: 18

Premium Essay

An Internet Banking System

...Honours Documentation 2012 Author: Mohamed Hassan Ali Student Number: 3270152 Supervisor: Mr. Michael Norman Department of Computer Science A mini-thesis submitted in partial fulfillment of the requirements for the degree of B.Sc. Honours. ABSTRACT The adoption of Electronic Banking by commercial enterprises has been in existence since the mid 90s, much greater in number due to lower operating costs associated with it. Electronic banking has initially been in the form of automatic teller machines and telephone transactions. More recently, it has been transformed by the Internet, a new delivery channel for banking services that benefits both customers and banks. Internet banking system services can include: Open an account, Balance enquiry, Request for Cheque book, Beneficiary payments (EFT), Viewing monthly. Furthermore, customer’s application for electronic banking facilities is expanding as the cost savings on transactions over the Internet are significant. i PLAGIARISM DECLARATION I, Mohamed Hassan Ali, certify that this project is my own work. I understand what plagiarism is and I have used quotations and references to fully acknowledge all the words and ideas of others, which we have used in our project. I have not copied anyone else's project. I have also not permitted anyone to copy my project. Signature: _ _ _ _ _ _ _ _ _ _ _ ii ACKNOWLEDGEMENTS First and foremost I am ever grateful to my Allah to whom I owe my life. I would...

Words: 2959 - Pages: 12

Free Essay

Re: Target Jbims.. Dream Team 2012.. Do You Have It in You...

...CSE- 401 DISTRIBUTED SYSTEMS [3 1 0 4] 1. Distributed System Models: Introduction , Examples , Architecture models , Fundamental models (1.1,1.2,1.4, 2.1-2.3 of Text1 ) ..2hrs 2. Interprocess Communication, Distributed Objects and Remote Invocation: Introduction , External data representation and marshalling, Communication models, Communication between distributed objects , Remote procedure call Case study: Interprocess communication in UNIX, Java RMI . (4.1-4.6, 5.1-5.5 of Text1) ..6hrs 3. Operating System Introduction , Operating system layer, Processes and threads, Communication and invocation, Architecture (6.1-6.6 of Text1) ..4hrs. 4. Distributed File Systems and Name Services: Introduction , File service architecture, Name services, Domain Name System, Directory and directory services. Case study: Sun network file system, Global name service. (8.1-8.3, 9.1-9.4 of Text1) …6hrs 5. Synchronization: Clock Synchronization, Physical clocks, Logical clocks, Global state (5.1-5.3 of Text2) ..5hrs 6. Transactions&...

Words: 5050 - Pages: 21

Premium Essay

Business Process Management

...Business Process Management Methodology 1 Introduction From Wikipedia, we copy: «A business process is a set of linked activities that create value by transforming an input into a more valuable output. Both input and output can be artifacts and/or information and the transformation can be performed by human actors, machines, or both. There are three types of business processes: 1. Management processes - the processes that govern the operation. Typical management processes include "Corporate Governance" and "Strategic Management". 2. Operational processes - these processes create the primary value stream, they are part of the core business. Typical operational processes are Purchasing, Manufacturing, Marketing, and Sales. 3. Supporting processes - these support the core processes. Examples include Accounting, Recruitment, IT-support. A business process can be decomposed into several sub-processes, which have their own attributes, but also contribute to achieving the goal of the super-process. The analysis of business processes typically includes the mapping of processes and sub-processes down to activity level. Activities are parts of the business process that do not include any decision making and thus are not worth decomposing (although decomposition would be possible), such as "Answer the phone", "produce an invoice".» A business process is a systematic approach of the enterprise, where its activities are examined as revenue generating and value adding transformations of...

Words: 8923 - Pages: 36

Free Essay

Engineering Managemnet

...applications. After working for 17 months as technical sales engineer with Arrow Electronics where I supported many embedded clients in different projects my zeal to advance in embedded systems increased. I want to pursue an MS degree in the field Electrical and Electronics Engineering with specialisation in embedded systems which will help to realise my goal to work as a design engineer and take embedded systems to a new height. This will in turn fulfil my ambition of bringing innovation in the development of ESDM (Electronic System Design and Manufacturing) in my country. Honestly, when I decided to do my Bachelors in Electronics Engineering it was mainly because of my inclination in the subject of physics and mathematics during my intermediate study. Electronics industry in my country is poised to become very vibrant and happening and my goal of contributing to the same further bolstered my decision to enrol for Bachelor of Engineering in Electronics at K.J. Somaiya College of engineering. The curriculum covered all the elements that are involved in embedded systems. The course covered digital electronics, embedded systems and concept oriented techniques like DSP, microcontroller programing, CVAVR, networks and communication and also various robotic concepts. In the final year of the program I worked on developing a detailed project Ant Simulated Robot. The robot simulated the behaviour...

Words: 982 - Pages: 4

Free Essay

Programming

...means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. International Standard Book Number: 0-672-31633-1 Library of Congress Catalog Card Number: 98-83221 Printed in the United States of America First Printing: May 1999 01 00 99 4 3 2 1 EXECUTIVE EDITOR Brian Gill DEVELOPMENT EDITOR Jeff Durham MANAGING EDITOR Jodi Jensen PROJECT EDITOR Tonya Simpson COPY EDITOR Mike Henry INDEXER Larry Sweazy PROOFREADERS Mona Brown Jill Mazurczyk TECHNICAL EDITOR Richard Wright Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. SOFTWARE DEVELOPMENT SPECIALIST Dan Scherf INTERIOR DESIGN Gary Adair Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an “as is” basis. The...

Words: 10065 - Pages: 41

Free Essay

System Development Method

...is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations. CMS has considered each of the major prescribed methodologies in context with CMS’ business, applications, organization, and technical environments. As a result, CMS requires the use of any of the following linear and iterative methodologies for CMS systems development, as appropriate. Acceptable System Development Methodologies Waterfall Initial Investigation Requirements Definition System Design Coding, testing,... Implementation Operation & Support Framework Type: Linear Basic Principles: 1. Project is divided into sequential phases, with some overlap and splashback acceptable between phases. 2. Emphasis is on planning, time schedules, target dates, budgets and implementation of an entire system at one time. 3. Tight control is maintained over the life of the project through the use of extensive written documentation, as well as through formal reviews and approval/signoff by the _____________________________________________________________________________________________ Office of Information Services 1 user and information technology management occurring at the end of most phases before beginning the next phase. Strengths: 1. Ideal for supporting less experienced project teams and project managers, or...

Words: 3573 - Pages: 15