1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zhannawk [14.2K]
3 years ago
11

Write a program to prepare the monthly charge account statement for a customer of CS CARD International, a credit card company.

The program should take as input the previous balance on the account and the total amount of additional charges during the month. The program should then compute the interest for the month, the total new balance (the previous balance plus additional charges plus interest), and the minimum payment due. Assume the interest is 0 if the previous balance was 0 but if the previous balance was greater than 0 the interest is 2% of the total owed (previous balance plus additional charges).
Computers and Technology
1 answer:
WITCHER [35]3 years ago
5 0

Answer:

import java.util.*;

import java.text.*;

class CreditCardBill

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

NumberFormat defaultFormat = NumberFormat.getCurrencyInstance(Locale.US);

System.out.println("CS Card International Statement");

System.out.println("===============================");

System.out.print("Previous Balance: $");

double prevBalance = sc.nextDouble();

System.out.print("Additional Charges: $");

double addCharges = sc.nextDouble();

double interest;

if(prevBalance == 0)

interest = 0;

else

interest = (prevBalance + addCharges) * 0.02;

System.out.println("Interest: "+defaultFormat.format(interest));

double newBalance = prevBalance + addCharges + interest;

System.out.println("New Balance: "+defaultFormat.format(newBalance));

double minPayment;

if(newBalance < 50)

minPayment = newBalance;

else if(newBalance <= 300)

minPayment = 50.00;

else

minPayment = newBalance * 0.2;

System.out.println("Minimum Payment: "+defaultFormat.format(minPayment));

}

}

You might be interested in
Which of the following creates an array of 25 components of the type int?
kozerog [31]

Answer:

(ii) int[] alpha = new int[25];

Explanation:

In JAVA in order to create an array;

int name[];

name = new int[size];

can be written like above, however, to make it shorter can be written like below;

int[] name = new int[size];

<em>Well, name is the array name you assign, int is the type of an array as integer and size you assign for an array, in that sense </em><em>(ii)</em><em> is the correct answer</em>

(ii) int[] alpha = new int[25];

alpha is the name of an array

int is the type of array as an integer

25 is the size of an array

6 0
3 years ago
This is a standard routine used to perform a mathematical task in excel is called?
wariber [46]

Answer:

<u>A function</u> is a predefined formula that performs calculations using specific values in a particular order.

3 0
3 years ago
Windows OS and Mac OS are examples of which type of operating systems?
MariettaO [177]

Answer:

Single-user, multi-tasking

Explanation:

This is the type of operating system most people use on their desktop and laptop computers today. Microsoft's Windows and Apple's MacOS platforms are both examples of operating systems that will let a single user have several programs in operation at the same time. For example, it's entirely possible for a Windows user to be writing a note in a word processor while downloading a file from the Internet while printing the text of an e-mail message.

5 0
4 years ago
How do i add a blog to my wordpress site?
jek_recluse [69]
From the Dashboard, choose Pages→Add New                                             Type a name for the page in the text box toward the top of the page.     <span>Leave the text box blank.
</span>



5 0
3 years ago
Need help with these plss correct answers
Irina-Kira [14]

Answer: The only thing i could find was this I hope this helps you out

Timing and Spacing: The number of frames between two poses, and how those individual frames are placed.

Squash and Stretch: The flexibility of objects to exaggerate or add appeal to a movement.

Anticipation: The setup for an action to happen.

Ease In and Ease Out: The time for acceleration and deceleration of movement.

Follow Through and Overlapping Action: The idea that separate parts of the body will continue moving after a character or object comes to a full stop, and the idea that parts of the body will move at different times.

Arcs: The principle that smooths animation and moves action in a realistic way.

Exaggeration: The pushing of movement further to add more appeal to an action.

Solid Drawing: The accuracy of volume, weight, balance, and anatomy.

Appeal: The relatability (or charisma) of a character.

Straight Ahead Action and Pose to Pose: The spontaneous and linear approach to creating an action using many in-between poses along with the main poses, and the more methodical approach to creating an action using only a few poses.

Secondary Action: The actions that emphasize or support the main action of the animation.

Staging: The setting up of the scene, from placement of characters to the background and foreground elements, to how the camera angle is set up, the lighting and shadows, and more.

Explanation:

3 0
2 years ago
Other questions:
  • Regional culture has been affected by technology in these ways. Select all that apply. decreased educational opportunities impro
    9·2 answers
  • In python:
    8·1 answer
  • Where could an identity theft access your personal information
    9·2 answers
  • The traditional UNIX scheduler enforces an inverse relationship between priority numbers and priorities: the higher the numbe1~
    6·1 answer
  • Write a program that reads in characters from standard input and outputs the number of times it sees an 'a' followed by the lett
    11·1 answer
  • What is the general form of an internet email address<br>​
    5·1 answer
  • Write a program that implements the FIFO and LRU page-replacement algorithms learned in class. First, generate a random page ref
    9·1 answer
  • A set of instructions to increase a programmer’s pay rate by 10 percent is hidden inside an authorized program. It changes and u
    12·1 answer
  • একটি ডকুমেন্ট তৈরী করে ড্রাইভে সেভ করার পদ্ধতি বর্ণনা করো
    10·1 answer
  • An e-commerce client is moving from on-premise, legacy systems to a cloud-based platform. During the transition, the client is a
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!