Reference no: EM13802224
Goal: The purpose of this lab is to demonstrate an understanding of static variables and methods.
Problem: You are working for Plastercard, Inc., a company that specializes in credit cards for handymen.
The company plans to launch a new credit card and needs your help in designing an object-oriented application to run usage of the credit card.
Based on some requirements analysis, you create the following detailed UML diagram for a CreditCard class:
(+) DEFAULT_CREDIT_LIMIT: double The default credit limit across all credit cards ($1000.00)
(-) numOpenAccounts: int The number of open credit card accounts
(-) lastAccountNumber: int Starting at 200, the last account number assigned
(-) accountNumber: int The account number of the credit card
(-) numCyclePurchases: int The number of purchases made in a billing cycle of the credit card
(-) balance: double The balance of the credit card
(-) creditLimit: double The credit limit of the credit card
(-) open: boolean The status of the credit card (open or closed)
(+) CreditCard() Constructs a default CreditCard object with an account number, number of purchases made in a billing cycle, balance,credit limit, and open status
(+) CreditCard(creditLimit : double) Constructs a CreditCard object with a specified credit limit
(+) getAccountNumber(): int Returns the account number of this credit card
(+) getNumCyclePurchases(): int Returns the number of purchases made in a billing cycle of this credit card
(+) getBalance(): String Returns the balance of this credit card
(+) getCreditLimit() : double Returns the credit limit of this credit card
(+) isOpen(): boolean Returns the status of this credit card (open or closed)
(+) getNumOpenAccounts(): int Returns the number of open credit card accounts
(+) charge(amount : double): boolean Returns if a credit card charge was successful if the account was open, a valid amount was provided, and the balancewould not exceed the credit limit. The amount is added to the balance and the number of purchases made in the billing cycle is incremented
(+) payBill(amount : double): boolean Returns if the credit card bill was successfully paid if theaccount was open and the amount to pay equaled the amount of the balance. The balance and number of purchases made inthe billing cycle is reset to 0
(+) close(): boolean Returns if the credit card was successfully closed only If thecredit card was open
(+) toString(): String Returns a string representation of this Credit Card
First, create a data definition class based solely on the above detailed UML diagram. Then, create animplementation class that tests each of the methods of the data definition class. No user input is required in the implementation class. Rather, data can be hardcoded. Attempt to replicate a running of the application as shown in the screenshots below. You can start with the following skeleton which may help you:
import javax.swing.JOptionPane;
public class Lab3_CreditCardImplementation {
public static void main(String[] args) {
Lab3_CreditCard creditCard1 = new Lab3_CreditCard();
Lab3_CreditCard creditCard2 = new Lab3_CreditCard(2000.00);
}
}
Starbucks decision form a capital budgeting outline
: Recently, Starbucks acquired Teavana for $620 million for the company which represented at 50% premium from Teavana’s then valuation. Discuss the recent acquisition, the probable growth of the tea industry and Starbucks’ decision form a capital budge..
|
Interest rate statements as either nominal or effective
: Identify the following interest rate statements as either nominal or effective: (a) 1% per month compounded weekly; (b) 0.5% per week compounded weekly; (c) effective 15% per year com- pounded monthly;
|
Block booking-full line forcing anticompetitive
: Why would the Department of Justice consider activities like blind booking, block booking, and full line forcing anticompetitive?
|
Would your portfolio be riskless-explain
: Suppose you own a portfolio consisting of $250,000 of long-term U.S. government bonds. What is the least risky security you can think of? Explain. Would your portfolio be riskless? Explain.
|
Demonstrate an understanding of static variables and methods
: Goal: The purpose of this lab is to demonstrate an understanding of static variables and methods. Problem: You are working for Plastercard, Inc., a company that specializes in credit cards for handymen
|
Firm produce to maximize profits or minimize losses
: Suppose the cost function for your firm is: C = 10 +2Q + 5Q2. If the firm sells output in a perfectly competitive market and other firms in the industry sell output at a price of $35, What level of output should the firm produce to maximize profits o..
|
Write a persuasive essay about national current event
: Write a persuasive essay of approximately 700 to 1,050-words on a local, regional, or national current event or political issue that has affected you, your family, or your community recently.
|
Impact interest rates-consumption and investment
: Explain the 4 ways the Federal Reserve would increase the money Supply and explain and graph how this would impact interest rates, consumption, and investment, AD, GDP, Prices and Unemployment. (Make sure to include both the money and the goods graph..
|
Assignment on hypothesis identification article analysis
: Individual Assignment: Hypothesis Identification Article Analysis
|