answer.
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
Aleonysh [2.5K]
2 years ago
10

Import java.util.scanner; public class sumofmax { public double findmax(double num1, double num2) { double maxval; // note: if-e

lse statements need not be understood to // complete this activity if (num1 > num2) { // if num1 is greater than num2, maxval = num1; // then num1 is the maxval. } else { // otherwise, maxval = num2; // num2 is the maxval. } return maxval; } public static void main(string [] args) { double numa = 5.0; double numb = 10.0; double numy = 3.0; double numz = 7.0; double maxsum = 0.0;
Computers and Technology
1 answer:
jeyben [28]2 years ago
6 0

Here you go,


Import java.util.scanner

public class SumOfMax {

   public static double findMax(double num1, double num2) {

       double maxVal = 0.0;

       // Note: if-else statements need not be understood to

       // complete this activity

       if (num1 > num2) { // if num1 is greater than num2,

           maxVal = num1; // then num1 is the maxVal.

       }

       else { // Otherwise,

           maxVal = num2; // num2 is the maxVal.

       }

       return maxVal;

   }

   public static void main(String[] args) {

       double numA = 5.0;

       double numB = 10.0;

       double numY = 3.0;

       double numZ = 7.0;

       double maxSum = 0.0;

       /* Your solution goes here */

       maxSum = findMax(numA, numB); // first call of findMax

       maxSum = maxSum + findMax(numY, numZ); // second call

       System.out.print("maxSum is: " + maxSum);

       return;

   }

}

/*

Output:

maxSum is: 17.0

*/

You might be interested in
An attacker distributes hostile content on Internet-accessible Web sites that exploit unpatched and improperly secured client so
julia-pushkina [17]

Answer:

Since the attack impacts the client SANS Critical Security Controls. This act affects the Inventory of authorized and unauthorized software running on the victim's machine.

5 0
1 year ago
Read 2 more answers
You have been tasked with building a URL file validator for a web crawler. A web crawler is an application that fetches a web pa
mixas84 [53]

Answer:

Python Code:

def validate_url(url):

#Creating the list of valid protocols and file name extensions

valid_protocols = ['http', 'https', 'ftp']

valid_fileinfo = ['.html', '.csv', '.docx']

#splitting the url into two parts

url_split = url.split('://')

isProtocolValid = False

isFileValid = False

#iterating over the valid protocols and file names for validity

for x in valid_protocols:

if x in url_split[0]:

isProtocolValid = True

break

for x in valid_fileinfo:

if x in url_split[1]:

isFileValid = True

break

#Returning the result if the URL has both valid protocol and file extension

return (isProtocolValid and isFileValid)

url = input("Enter an URL: ")

print(validate_url(url))

Explanation:

The image of the output code is attached. Hope it helps.

4 0
1 year ago
1. Accessing calendars, contact information, emails, files and folders, instant messages, presentation, and task lists over the
Veseljchak [2.6K]
1. Cloud Computing
2. Web Conferencing
3. Ribbon
4. PowerPoint
5. Sadie should share the document in One Drive and give her sister permission to edit the document
6. The design and arrangement of items for efficiency and safety
6 0
1 year ago
5.6 Look carefully at how messages and mailboxes are represented in the email system that you use. Model the object classes that
Annette [7]

Answer:

See explaination for the details of the answer.

Explanation:

A class is a structured diagram that describes the structure of the system.

It consists of class name, attributes, methods and responsibilities.

A mailbox and an email message has some certain attributes such as, compose, reply, draft, inbox, etc.

See attachment for the Model object classes that might be used in the system implementation to represent a mailbox and an email message.

5 0
2 years ago
The most commonly used method to connect to a WAN is through the telephone system. To do so, what piece of equipment would you r
Step2247 [10]

Modems create an analog signal that carries digital data on it,
and strip the digital data from an analog signal that they receive. 
That's what's needed to connect through the telephone system,
since the telephone system is still one big analog system.


8 0
1 year ago
Read 2 more answers
Other questions:
  • Which statements describe the advantages of using XML?
    12·2 answers
  • If there are three classes, Shape, Circle and Square, what is the most likely relationship among them?
    15·1 answer
  • Write a script that creates a user-defined database role named OrderEntry in the MyGuitarShop database. Give INSERT and UPDATE p
    8·1 answer
  • A slide in Blake's presentation contained the following information:
    11·1 answer
  • Light travels at 3 × 108 meters per second. A light-year is the distance a light beam travels in one year.Write a PYTHON program
    14·1 answer
  • Which of the following option is correct about HCatalog?
    14·1 answer
  • Danielle, a help desk technician, receives a call from a client. In a panic, he explains that he was using the Internet to resea
    9·1 answer
  • Declare a struct named PatientData that contains two integer data members named heightInches and weightPounds. Sample output for
    13·1 answer
  • Write a loop to populate the list user_guesses with a number of guesses. The variable num_guesses is the number of guesses the u
    13·1 answer
  • Identify the tips to create a well-designed digital portfolio.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!