What do you understand by instantiating an object, JAVA Programming

Assignment Help:

Question:

(a) To be considered object-oriented(OO), a language should support abstraction, encapsulation, inheritance and polymorphism.

Explain briefly each of the terms in bold font.

(b) What do you understand by "instantiating an object"?

(c) A bank account has two pieces of data - a password and a balance, and as actions to act on that data, it allows a user to create account, make deposits, make withdrawals, and to check the balance.

Deposit is used to add cash to the account. It simply increments Balance by the amount of the deposit. Withdraw is used to remove cash from the account. However, it needs to be a bit selective. First it checks to see if the password passed in matches the initial password. It also checks to ensure that the amount requested to be withdrawn is available in the account. If it passes these two conditions, then Balance is decremented by the amount of the withdrawal. GetBalance checks the password and then returns balance.

Write a script which has four methods to act on the bank data: new, mDeposit, mWithdraw, and mGetBalance.

(d) (i) Give three advantages of using Parent scripts in place of globals.

(ii) Give three disadvantages of using Parent scripts in place of globals.


Related Discussions:- What do you understand by instantiating an object

Simple Java Project Please help, I have a project due tonight and I need he...

I have a project due tonight and I need help setting up the project I know what I need to put in the class but not sure how to set it up properly

What is an objects lock, What is an object's lock and which objects have lo...

What is an object's lock and which objects have locks? An object's lock is a mechanism that is used by multiple threads to get synchronized access to the object. A thread may i

I need android kiosk mode, I need Android Kiosk Mode Project Description...

I need Android Kiosk Mode Project Description: I need an Android platform developer to develop an app when device start it start into kiosk mode. Only browser window open a c

Want a graph database for relationship mapping of entities, Want a graph da...

Want a graph database for relationship mapping of entities Project Description: I want a graph database for relationship mapping of entities, liable peoples. Also, the databa

I want linux server expert with tomcat skills, I want Linux server expert w...

I want Linux server expert with Tomcat skills Project Description: I want a Linux server expert to look in to an issue with my domain. It is down since three days as there is

About state and behavier of two different object, two different object may...

two different object may have chance to have same behavier but property must be different why?

What are the design goals of java, What are the Design Goals of Java Ma...

What are the Design Goals of Java Massive growth of the Internet and World-Wide Web leads us to a completely new way of looking at development of software which can run on diff

Explain the user defined exceptions, Explain the user defined Exceptions. ...

Explain the user defined Exceptions. User Defined Exceptions are the exceptions which are defined by user for specific purposed. This enables custom exceptions to be generated

Write a program in javascript that will read in an xml file, Write a progra...

Write a program in Javascript that will read in an XML file. This file will contain details of devices maintained by the IT department of an organisation including an ID number, de

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd