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
Write a program that prompts the user to enter a series of numbers between 0 and 10 asintegers. The user will enter all numbers
Anna71 [15]

Answer:

The program in Python is as follows:

import collections

from collections import Counter

from itertools import groupby

import statistics

str_input = input("Enter a series of numbers separated by space: ")

num_input = str_input.split(" ")

numList = []

for num in num_input:

         if(num.lstrip('-').isdigit()):

                   if num[0] == "-" or int(num)>10:

                             print(num," is out of bound - rejecting")

                   else:

                             print(num," is valid - accepting")

                             numList.append(int(num))

         else:

                   print(num," is not a number")

print("Largest number: ",max(numList))

print("Smallest number: ",min(numList))

print("Range: ",(max(numList) - min(numList)))

print("Mode: ",end = " ")

freqs = groupby(Counter(numList).most_common(), lambda x:x[1])

print([val for val,count in next(freqs)[1]])

count_freq = {}

count_freq = collections.Counter(numList)

for item in count_freq:

         print(item, end = " ")

         lent= int(count_freq[item])

         for i in range(lent):

                   print("#",end=" ")

print()

Explanation:

See attachment for program source file where comments are used as explanation. (Lines that begin with # are comments)

The frequency polygon is printed using #'s to represent the frequency of each list element

7 0
2 years ago
Which of the following can be used to determine how much traffic a website is getting?
Bumek [7]
Analytics can be used to determine the amount traffic a website is getting. The correct option among all the options that are given in the question is the second option. Web analytics is used to determine several important information’s about a website. This feature can also be used to determine the region from which the maximum and the minimum traffic is arriving. Based on the information’s received from analytics, the website owner can take steps to improve the amount of traffic that is coming to the website.



6 0
2 years ago
Choose all the answers that apply.
den301095 [7]
[1] is false, because we are talking about light reaching Earth's surface as a whole, and not in one specific place.

[2] is false, because even if it was in the middle of the night, the other side of the world will be recieving pretty much just as much light as you did the following day.

[3] is false, because even though the sun comes up lower during Winter months, and higher during Summer months, seasons are not constant throughout the entire world. So for what may be Winter for you, will likely be Summer for someone else, so still, just as much light is reaching the Earth.

[4] is false, because wind doesn't affect how light travels.

[5] is true, because clear skies will allow more light to come through that cloudy skies, for example, meaning the amount of light reaching the Earth's surface would not be consistent.
7 0
3 years ago
Read 2 more answers
_____ software is used to play, create, and modify audio and video files.
joja [24]
It's most likely multimedia.
4 0
3 years ago
Give two logics how a computer is better then man ​
Alex_Xolod [135]

Answer:

Remember facts precisely without error or difficulty recalling.Perform repeated operations/actions without getting tired, bored, hungry or sleepy.Numeric calculations.Play certain games: AlphaGo Zero: Learning from scratch | DeepMindDo as they are told (though sometimes too precisely).

Explanation:

Hope it helps!!!

3 0
1 year ago
Other questions:
  • ________is one color shade gradually progressing to another shade of the same color or one color progressing to another color.
    14·1 answer
  • What are some examples of environmental technology
    8·1 answer
  • what key aspects did you learn regarding the creation, analysis, and management of information systems? How will this impact you
    5·1 answer
  • What dose a bios system do?
    5·2 answers
  • What can act as a buffer against unemployment
    11·1 answer
  • Discuss whether the redundant data should be addressed prior to beginning the wireless network architecture project, in coordina
    11·1 answer
  • You have four DCs in your domain. Active Directory appears to be corrupted on one of the DCs, and you suspect a failing hard dri
    5·1 answer
  • Magbigay ng ibang produkto na ginagamitan ng kasanayan ng basic sketching shading at outlining ​
    12·1 answer
  • Fill in the blanks:<br>Can anyone help me out with this <br>​
    9·1 answer
  • Select the correct answer from each drop-down menu.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!