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

Overview of struts?, Struts is a framework with set of co operating servlet...

Struts is a framework with set of co operating servlets, classes and JSP tags that create a reusable MVC 2 design.     1. Client (Browser) : A request from the cli

Create a jsp code to built an application, What is required to be done from...

What is required to be done from my programming is : I enter name,day(saturady or sunday),time( 10AM and 10PM) My program must then vaildate name,day and time. Name must only a

Explain the relational operator precedence, Explain the Relational Operator...

Explain the Relational Operator Precedence ? Whenever a new operator is introduced you have to ask yourself whereas it fits in the precedence tree. If you seem back at the ins

For statement in javascript, A for loop repeats until a specified condition...

A for loop repeats until a specified condition evaluates to false. For for loop the JavaScript is similar to the Java and C for loops. A for statement looks as:  for ([initial-

Program to calculates the number of unique shapes, 1. Write the code for th...

1. Write the code for the method that calculates the number of unique shapes for a binary search tree with n nodes. Use the formula  where b n is the number of possible sh

Why uploading a web page is important, Why uploading a web page is importan...

Why uploading a web page is important? Describe in 2 - 3 lines? Through only uploading webpage we could place our data so that another can reach up to what we have loaded. Uplo

Decision structures, for $9.95 per month, 10 hours of access are provided.A...

for $9.95 per month, 10 hours of access are provided.Additional hours are $2.00 per hour

What is a socket in java networking and rmi, A socket is one end-point of a...

A socket is one end-point of a two-way communication link among two programs running on the network. A socket is bound to a port number so that the TCP layer can recognize the appl

Action listener and event listener, differende between action listener and ...

differende between action listener and event listener

Uses of fileinputstream and fileoutputstream, Java Programming 1. Write...

Java Programming 1. Write a program in Java to find the highest of any five numbers. How do you compile and execute this Java program? 2. Write a program to explain the Exce

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