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
AnnyKZ [126]
3 years ago
13

Kim is creating a PowerPoint

Computers and Technology
1 answer:
postnew [5]3 years ago
5 0

Answer:

ok???

Explanation:

You might be interested in
The Account class contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and a
melamori03 [73]

Answer:

I've updated the Account class as per the instructions. The instructions mention "the constructor for this class creates a random account number" although I didn't find where that was. As a result, I created a simple method to generates the account number (located at the bottom of the class). Be sure you understand the changes (highlighted in yellow) and feel free to ask follow-up questions:

Explanation:

//*******************************************************

// Account.java

//

// A bank account class with methods to deposit to, withdraw from,

// change the name on, and get a String representation

// of the account.

//*******************************************************

import java.util.Random;   // Used for Random # generator

public class Account

{

      private double balance;

  private String name;

     private long acctNum;

      //----------------------------------------------

 //Constructor -- initializes balance, owner, and account number

  //----------------------------------------------

 public Account(double initBal, String owner, long number)

{

        balance = initBal;

               name = owner;

            acctNum = number;

}

// !!!!!! New Constructor !!!!!!

public Account(double initBal, String owner)

     {

        balance = initBal;

               name = owner;

            acctNum = generateAccountNumber();

       }

  // !!!!!! New Constructor !!!!!!

 public Account(String owner)

     {

        balance = 0;

             name = owner;

            acctNum = generateAccountNumber();

       }

   //----------------------------------------------

 // Checks to see if balance is sufficient for withdrawal.

// If so, decrements balance by amount; if not, prints message.

  //----------------------------------------------

 public void withdraw(double amount)

      {

        if (balance >= amount)

                balance -= amount;

               else

                     System.out.println("Insufficient funds");

}

 // !!!!!! New withdraw() method !!!!!!

   public void withdraw(double amount, double fee)

  {

        double amountWithFee = amount + fee;

               if (balance >= amountWithFee)

                 balance -= amountWithFee;

        else

                     System.out.println("Insufficient funds");

}

   //----------------------------------------------

 // Adds deposit amount to balance.

       //----------------------------------------------

 public void deposit(double amount)

       {

        balance += amount;

       }

  //----------------------------------------------

 // Returns balance.

      //----------------------------------------------

 public double getBalance()

       {

        return balance;

  }

    //----------------------------------------------

 // Returns a string containing the name, account number, and balance.

    //----------------------------------------------

 public String toString()

 {

        return "Name:" + name +

          "\nAccount Number: " + acctNum +

         "\nBalance: " + balance;

 }

 // !!!! NEW PRIVATE HELPER METHOD TO GENERATE ACCOUNT NUMBERS !!!!!

//-------------------------------------------------------

// Returns a random account number between 10000 - 99999

 //--------------------------------------------------------

       private long generateAccountNumber()

     {

        Random r = new Random();        // Seed the random number genertor with the system time

         return 10000 + r.nextInt(89999);        // .nextInt(89999) will return a value between 0 and 89999)

      }

}

8 0
4 years ago
Which directive is used when defining 64-bit IEEE long reals?
Taya2010 [7]

Answer:

The answer is "Option b".

Explanation:

In the project of IEEE-754 to define 64 -bit we require a REAL8 double precision that is equal to 8 bytes and 64 bit, and it is also used for floating-point arithmetic, and other options were not correct that can be described as follows:

  • In option a, REAL4 is used to define 32-bit, that's why it is not correct.
  • In option c, This type of declaration is not valid in IEEE, that's why it is wrong.
  • In option d, The REAL is a keyword that is used to define a value but in this, there is no value to define, that's why it is wrong.

7 0
3 years ago
Select the correct answer.
ella [17]

Answer:

Python

Explanation:

8 0
3 years ago
What can I do If my Texas Instrument TI-84 calculator is not giving accurate answers?
zlopas [31]

Answer:

replace the batteries possibly

Explanation:

4 0
2 years ago
Create a web page that uses JavaScript to print a payroll report for a company that has a few employees, all earning the same ho
zhenek [66]

Answer:

  1. let employee1 = {
  2.    Name : "Kate",
  3.    Hour : 38,
  4. };
  5. let employee2 = {
  6.    Name : "John",
  7.    Hour : 45,
  8. };
  9. let employee3 = {
  10.    Name : "Catherine",
  11.    Hour : 40,
  12. };
  13. let employeeArr = [employee1, employee2, employee3];
  14. let payrollRef = document.getElementById("payroll");
  15. let output = "";
  16. for(let i = 0; i < employeeArr.length; i++){
  17.    let h = employeeArr[i].Hour;
  18.    let pay;
  19.    if(h <=40){
  20.        pay = h * 15;  
  21.    }else{
  22.        pay = 40 * 15;
  23.        pay += (h - 40) * 15 * 1.5;
  24.    }
  25.    output += "Employee Name: " + employeeArr[i].Name + "<br>";
  26.    output += "Total working hour: " + employeeArr[i].Hour + "<br>";
  27.    output += "Total pay: $" + pay + "<br>";
  28.    output += "<hr>"
  29. }
  30. payrollRef.innerHTML = output;

Explanation:

Presume there is a div element with id "payroll" in a html file. We can write a JavaScript to create a payroll report and place the output to the div.

In JavaScript, let's presume there are only three employees and their names and total working hour are recorded in three objects (Line 1 - 14). Next, we put those employee objects into an array, employeeArr (Line 16).

Next, create a for loop to traverse through each object from employeeArr and calculate the pay based on their working hour (Line 22 - 31).

Next, generate the output string which includes employee name, working hour and total pay (Line 33 -36).

At last,  set the output string as the contents payroll (Line 39).

3 0
3 years ago
Other questions:
  • How should you decide what to wear to an interview? What kind of things should be considered?
    5·1 answer
  • What is the top folder of the file tree called
    5·2 answers
  • Answer the following questions:
    7·1 answer
  • Assignment 1 is to write a program that will write the lyrics to "X number of beers on the wall". Use only the main method. Prom
    11·1 answer
  • What do astronomers call a system that is composed of more than two stars?
    9·2 answers
  • How do you program a computer
    7·1 answer
  • Word processing software, spreadsheet software, database software, and presentation software are examples of what category of co
    13·1 answer
  • Please describe the role of games in modern society!
    5·2 answers
  • In Python, the data structure that stores elements of the same data type is called an array.
    6·1 answer
  • During the post process,the Bios uses two different ways to notify you of a problem. Error beep codes and error messages .Explai
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!