Current balance and the maximum balance

Assignment Help Business Management
Reference no: EM132436270

Problem: Complete the GiftCard class shown below. A GiftCard keeps track of the current balance and the maximum balance. A gift card starts with a beginning balance. A GiftCard can be used to make a purchase, funds can be added to a GiftCard, and the balance can be checked at any time. The balance can never be negative. If the amount added to the card is $100 or more, a bonus of $10 is also added. (20 points)

public class GiftCard

{

     // declare instance variables

     // precondition: the starting balance is not negative

     // postcondition: all instance variables are initialized

     public GiftCard(double startBal)

     {

     }

     // postcondition: amount is subtracted from balance

     // if there are insufficient funds, the balance is set to zero and a message

     // is displayed to indicate how much of the transaction is still owed

     public void spendFunds(double amount)

     {

     }

     // postcondition: amount is added to balance, if the amount is at least 100 dollars,

     // 10 dollars is added

     public void addFunds(double amount)

     {

     }

     // postcondition: the current balance is returned

     public double checkBalance()

     {

     }

}

Reference no: EM132436270

Questions Cloud

How can sdn help a network administrator manage : How can SDN help a network administrator manage their company new to cloud computing services as it relates to networking and its requirements?
Explain blue sky mine and corporate social responsibility : Explain the Blue Sky Mine was opened in Western Australia in the early 1940s and operated until it became unprofitable in the mid-60s
Cisco application centric infrastructure enterprise module : Please give me a concise description of how the Cisco Application Centric Infrastructure Enterprise Module (APIC-EM) Path Trace Application
How is a concern with environmental health sciences : How is this a concern with Environmental Health Sciences? Are there ethical issues with this?As an environmental health scientist
Current balance and the maximum balance : Complete the GiftCard class shown below. A GiftCard keeps track of the current balance and the maximum balance. A gift card starts with a beginning balance.
Combined and integrated to form new hybrid methodologies : The basic types of methodologies can be combined and integrated to form new hybrid methodologies.
Discuss the themes of Mortality in the story of Gilgamesh : Discuss the themes of Mortality, Permanence, and Fame that are all addressed in the story of Gilgamesh. Why is the fear of death so great?
What amount should be reported for depreciation expense : JJ Corporation purchased a machine on July 1, 2010 for $750,000. What amount should be reported for Depreciation Expense as of December 31, 2013
Analysis of the system : During the analysis of the system it was possible to determine the values of A, B, C. Find the value of R2018 if R0 is known. A=5, B=17, C=23, R0=3

Reviews

Write a Review

Business Management Questions & Answers

  Legitimate reasons for not hiring someone

In hiring a prospective employee, there are legitimate reasons for not hiring someone. For example, the prospective employee may not meet legal requirements (i.e., he or she is a minor and cannot complete the tasks of the job based on the young ag..

  Discuss the similarities with respect to cultural diversity

Discuss the similarities and differences with respect to cultural diversity while conducting business in your chosen country and the United States.

  Post the changes to the accounting standards

The accounting team is uncertain as to how revenue should be recognised in the books post the changes to the accounting standards.

  Explain the application of these management concepts

Explain the application of these management concepts to your place of work; the paper will not simply be a report on the five functions in general.

  Challenges of competitive benchmarking

One of the challenges of competitive benchmarking is the potential for the competing company to "provide misleading information." Is this legal and/or ethical?

  Explain business located in state involved in lawsuit

Use the Internet to study the situation where the business located in state was involved in lawsuit(or draw from your own experience if you have been so unfortunate).

  Identify an organization

Write a 250- to 325 -word paper in which you identify an organization (Kmart) that have missed opportunities for innovation and/ are on the verge of closing down because a more innovative competitor has overtaken the market.

  New entrants because of the internet

What are some examples of industries where there have been a lot of new entrants because of the Internet? Have these new entrants been successful?

  What is the capital gain yield on the? bonds

The face value of the bonds is $ 1 comma $1,000. The price of the bonds is $ 1 comma $1,107.00 to yield 4.62%. What is the capital gain yield on the? bonds?

  Uses of flow chartsdescribe the different ways the

uses of flow chartsdescribe the different ways the flowchart can be used.how would you change the level of detail

  Describe mechanisms of corporate control

Describe these mechanisms of corporate control and expand on which of the mechanisms do you feel is the most effective to ensure that the interests of the share

  Stakeholders you will consult when developing the policy

Name the key stakeholders you will consult when developing the policy. How will you explain the benefits of the policy to them?

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