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
Colt1911 [192]
3 years ago
15

Edhesive unit 4 test answers

Computers and Technology
1 answer:
Fudgin [204]3 years ago
6 0

Answer:

Can you show the questions?

Explanation:

You might be interested in
Write a method that computes the sum of the digits in an integer. Use the following method header: public static int sumDigits(l
kifflom [539]

Answer:

The java program for the given scenario is shown below.

import java.util.*;

import java.lang.*;

public class Test

{

   //variables to hold the number, digits and sum of the digits

   //variable to hold number is assigned any random value

   static long num=123;

   static int sum=0;

   static int digit;

   static int s;

   //method to add digits of a number

   public static int sumDigits(long n)

   { do

       {

           digit=(int) (n%10);

           sum=sum+digit;

           n=n/10;

       }while(n>0);

       return sum;

   }

public static void main(String[] args) {

    s = sumDigits(num);

 System.out.println("The sum of the digits of "+num+ " is "+s);  }

}

OUTPUT

The sum of the digits of 123 is 6

Explanation:

1. The variables to hold the number is declared as long and initialized.

2. The variables to store the digits of the number and the sum of the digits are declared as integer. The variable, sum, is initialized to 0.

3. The method, sumDigits(), is defined which takes a long parameter and returns an integer value. The method takes the number as a parameter and returns the sum of its digits.

4. Inside method, sumDigits(), inside the do-while loop, the sum of the digits of the parameter is computed.

5. Inside main(), the method, sumDigits(), is called. The integer value returned by this method is stored in another integer variable, s.

6. The sum of the digits is then displayed to the console.

7. All the variables are declared outside main() and at the class level and hence declared static. The method, sumDigits(), is also declared static since it is to be called inside main().

8. In java, the whole code is written inside a class since java is a purely object-oriented language.

9. In this program, object of the class is not created since only a single class is involved having main() method.

10. The program can be tested for any value of the variable, num.

11. The file is saved as Test.java, where Test is the name of the class having main() method.

7 0
3 years ago
What are some signs that could help you determine that a date and time was inserted as a special object instead of
Jlenok [28]

Answer:

i) It is difficult to put the mouse pointer's insertion point in the text

ii) A gray border appear around the time and date when you point to it

Explanation:

When the date and time is pointed to or hovered using the mouse pointer, we have, that the background of the text changes to a grey border around the text when the date and time is inserted as a special object using the insert date and time button on the insert menu in the word processing application

The mouse pointer behaves different when working with some applications, and it could be difficult to place the insertion point of the mouse pointer in the  text

Therefore, the correct options are;

<em>It is difficult to put the mouse pointer's insertion point in the text and</em>

<em>A gray border appear around the time and date when you point to it.</em>

3 0
2 years ago
You cannot be everywhere at once, but your freedom allows you to
Kay [80]
This type of freedom is called dreaming
7 0
3 years ago
A domestic air carrier airplane lands at an intermediate airport at 1815Z. The latest time it may depart without a specific auth
serious [3.7K]

Answer:

A domestic air carrier airplane lands at an intermediate airport at 1815Z. The latest time it may depart without a specific authorization from an aircraft dispatcher is <u>1915Z (1 hour)</u>.

Explanation:

Under the domestic operations, an airplane landed on intermediate airport can remain their for not more than one hour so the time would me 1 hour.

Here the time represented by 1815Z and 1915Z is in Zulu Time Zone as depicted from letter "Z". The first two digits represent the hour (0-24) and the next two represent the minutes (0-59).

  • Here the landing time is 6:15 pm while departing time is after one hour that is 7:15 pm (1915Z).

i hope it will help you.

6 0
3 years ago
The appropriate length for an e-mail is about half the amount of text that will fit on an 8 1/2' by 11' page.
lys-0071 [83]

Wrong..............................................

7 0
3 years ago
Read 2 more answers
Other questions:
  • &gt;
    6·1 answer
  • Manuel is working on a project in Visual Studio. He wants to keep this program showing on the entire desktop, but he also needs
    7·1 answer
  • Your friends know that you understand a lot about computers, both the technical details of how they operate as well as informati
    12·1 answer
  • Jane is debugging a code consisting of 25 lines. The code starts executing at line 11. At line 13, the code calls another method
    10·2 answers
  • Which file system is designed to verify and autocorrect data faults on the volume without having to bring the volume down for ma
    11·1 answer
  • How can a user access the Mailbox Cleanup tools?
    11·2 answers
  • WAFL (write-anywhere file layout) Select one: a. is a distributed file system b. is a file system dedicated to single user opera
    6·1 answer
  • You should always be afraid to use the internet<br><br> True or false?
    11·1 answer
  • Help brainliest True or False
    10·2 answers
  • What is the two’s compliment of -95,-122,-111,-57
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!