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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:30, DestinyK8033
Why would a programmer use the logical operator and in an if statement? a: when an action is to be taken that requires both conditions to be falseb: when an action is to be taken that requires both conditions to be truec: when an action is to be taken that requires the first condition to be falsed: when an action is to be taken that requires the second condition to be truei took the test and the answer is b.
Answers: 3
image
Computers and Technology, 22.06.2019 17:40, math31343
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, schvox
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
Answers: 3
image
Computers and Technology, 24.06.2019 03:30, ava1018
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
You know the right answer?
Complete the giftcard class shown below. a giftcard keeps track of the current balance on the card....

Questions in other subjects:

Konu
Mathematics, 01.10.2019 03:00
Konu
Mathematics, 01.10.2019 03:00
Konu
Mathematics, 01.10.2019 03:00