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
rosijanka [135]
3 years ago
9

Create an application for a library and name it FineForOverdueBooks. TheMain() method asks the user to input the number of books

checked out and the number of days they are overdue. Pass those values to a method named DisplayFine that displays the library fine, which is 10 cents per book per day for the first seven days a book is overdue, then 20 cents per book per day for each additional day. The library fine should be displayed in the following format:
Computers and Technology
1 answer:
user100 [1]3 years ago
7 0

Answer:

using System.IO;

using System;

class FineForOverdueBooks

{

static void Main()

{

Console.WriteLine("Enter the number of books user checked out: ");

int books = Convert. ToInt32(Console.ReadLine());

Console.WriteLine("Enter the number of overdue days: ");

int days = Convert. ToInt32(Console.ReadLine());

DisplayFine(books, days);

}

public static void DisplayFine(int books, int days) {

double amt = 0;

int d = days;

if(days>7) {

amt = (days-7) * .20 * books;

days = 7;

}

if(days > 0) {

amt = amt + days * .10 * books;

}

Console.WriteLine("The fine for {0} book(s) for {1} day(s) is {2}", books, d, amt);

}

}

Explanation:

You might be interested in
Your new client's AdWords account has one campaign with one ad group that contains a list of hundreds of keywords. Which best pr
Degger [83]
<span>Create new ad groups with related keywords grouped together</span>
8 0
3 years ago
Create a class called Minimum that provides a single class method min. min should take an array of any object that implements Co
kaheart [24]

Answer:

The required code is given below:

Explanation:

public class Minimum {

   public static Comparable min(Comparable[] values) {

       if (values == null || values.length == 0) {

           return null;

       } else {

           Comparable minValue = values[0];

           for (int i = 0; i < values.length; i++) {

               if (values[i].compareTo(minValue) < 0) {

                   minValue = values[i];

               }

           }

           return minValue;

       }

   }

}

7 0
4 years ago
How many line ofoutput will be displayed by the following program fragment?
nexus9112 [7]

Answer:

Hi!

Let's make a quick debug of the code:

i    j   Output

0+0 =  0  

0+1 =    1

0+2 =  2

0+3 =  3

1+0 =  1 

1+1 =    2

1+2 =  3

1+3 =  4

2+0 =  2  

2+1 =    3

2+2 =  4

2+3 =  5

3+0 =  3  

3+1 =   4

3+2 =  5

3+3 =  6

4+0 =  4  

4+1 =   5

4+2 =  6

4+3 =  7

The total outputs is 20.

Explanation:

In the first iterations of the loop for the final value of the <em>i</em> is 1 and the final condition to stop of the do while is (<em>i</em> < 5) , so the iteration of for continues many times until  <em>i</em> break the condition.  

(5*4 = 20)

And after that you get 20 outputs.

I hope it's help you.

6 0
3 years ago
What type of malicious computer programs present themselves as useful computer programs or applications?
erastova [34]

Answer:

The correct answer to the following question will be "Trojan programs".

Explanation:

  • A trojan is a kind of software often identified as legal applications. Internet-thieves and hackers will hire Trojans and they were trying to access to consumer programs. Users are usually fooled into launching and operating Trojans on their devices by a certain form of economic manipulation.
  • It's a kind of malicious software that express themselves as helpful applications and programs.

Therefore, the Trojan program is the right answer.

5 0
3 years ago
Read 2 more answers
What are ways to enter a formula in Excel? Check all that apply. Click on the Function Library group and select a function from
zhenek [66]

Answer:

A. Click on the Function Library group and select a function from the drop-down menu.

B. Click on the Function Library group and Insert Function.

E. Type = into any cell.

F. Click on the formula bar above the cells.

3 0
3 years ago
Read 2 more answers
Other questions:
  • What are the changes in ios 14.2? What are the benefits of the ios developer program? What is next for Apple? Base your answers
    14·1 answer
  • Hey im trying to get a refund because i got charged 24$ for the yearly plan and i didnt know i would get charged can i get the y
    11·1 answer
  • Which two pieces of information must be provided when saving a file for the first time in Wordpad?____.
    8·1 answer
  • Create a goal seek analysis to determine what the price should be to generate demand of 2,625,000 tablets given that the supplie
    10·1 answer
  • QUESTION 56 Use the Windows ________ to check on a nonresponsive program. Backup utility Error-checking System Restore Task Mana
    6·1 answer
  • On the Audio Tools contextual tab, which tab will control how the audio file appears, if it appears, on the slide itself?
    8·2 answers
  • A large number of genetic codes are stored as binary values in a list. Which one of the following conditions must be true in ord
    5·2 answers
  • G i r l s o n l y j o i n <br> id= ons jcuv jke
    13·2 answers
  • Terrel is designing and maintaining a web page for a local company. In which career pathways would Terrel be involved?
    9·1 answer
  • What are three ways to protect yourself from identity theft when using your smartphone or computer?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!