subject

Complete the giftcard class shown below. a giftcard keeps track of the current balance on the card. 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.

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()
{

}
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 07:20
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience.ob. add presenter's notes to each slide.oc. add a video to each slide.od. save her slide presentation to a flash drive
Answers: 2
You know the right answer?
Complete the giftcard class shown below. a giftcard keeps track of the current balance on the card....
Questions
question
Mathematics, 04.02.2020 15:53
question
Mathematics, 04.02.2020 15:53
question
Geography, 04.02.2020 15:53
question
Mathematics, 04.02.2020 15:53
Questions on the website: 13722359