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
Maurinko [17]
3 years ago
7

Which of the following could be a constructor for the public class MyClass? a. public MyClass() b. public void MyClass() c. publ

ic MyClass(int a, double b)
Computers and Technology
1 answer:
finlep [7]3 years ago
3 0

Answer:

A) public MyClass ()

C) public MyClass (int a, double b)

Explanation:

In Java Constructors are special methods used to initialize objects of a class and they are called when a new object is created with the new keyword.

Being a special method a constructor cannot not have a return type... not even void.

The name of the constructor must match the name of the class and constructors can also have parameter(s)

You might be interested in
When parking uphill on a street with no curb, how should your front wheels be positioned? A. Turned to the left (toward the stre
Shkiper50 [21]
The answer is B. It matters which way you park your car . Your car should also be parallel to the carb but with the wheels inward to the right
8 0
3 years ago
Read 2 more answers
Select the correct answer from each drop-down menu.
xz_007 [3.2K]

Answer:

Maths operators

cell reference

5 0
3 years ago
Me pueden ayudar a hacer un proyecto de tecnología? mi fb es Erick Escaron (foto de perfil de free fire y dice veterano)
trapecia [35]

Answer:

tecnología? mi fb es Eri

8 0
3 years ago
Microsoft edge is a web browser that was designed as an add-in to internet explorer. true or false
arsen [322]
"add-in" is pretty ambigious but I would go with true for this one.
7 0
3 years ago
Design the program in the following way:
natali 33 [55]

Answer:

d = {}

while True:

   name = input("Enter the name of the boat (Press Enter or q to stop): ")

   if name == "" or name == "q":

       break

   time = int(input("Enter the time (in seconds): "))

   d[name] = time

winner_name = min(d, key=d.get)

winner_time = min(d.values())

average_time = sum(d.values()) / len(d.values())

slowest_boat = max(d, key=d.get)

slowest_time = max(d.values())

print(f"Winner name: {winner_name} and its time: {winner_time}")

print(f"Average time: {average_time}")

print(f"Slowest boat: {slowest_boat} and its time: {slowest_time}")

Explanation:

*The code is in Python.

Create an empty map(dictionary) to hold the values

Create a while loop. Inside the loop:

Ask the user to enter the name of the boat. Check if the user presses Enter or q, using if and break

Ask the user to enter the time

Insert these values as key-value pair to the map

When the loop is done:

Find the winner_name, the min() function finds the minimum value in a list. In this case, the key=d.get creates a list of the values in the map. The min(d, key=d.get) returns the key of the minimum value

Find the winner_time, min(d.values()) returns the minimum time in our map

Find the average time, the sum() function, returns the sum of the values in a list. In this case, sums all the values in the map. The len() function finds the count of the values. If we divide the sum of times entered by the count of the times entered, we get the average time

Find the slowest_time, the max() function returns the max of the value in a list. In this case, the maximum value is the slowest time

Print the results

5 0
2 years ago
Other questions:
  • What is the rationale behind the development of an operating system in computing?
    15·1 answer
  • A network technician is assisting the security team with some traffic captures. The security team wants to capture all traffic o
    9·1 answer
  • To build a user interface that contains graphical components, the components ____. must each be added to a separate panel. must
    7·1 answer
  • Assume you are given three variables, revenue, expenses, and profit, all of type Money (a structured type with two int fields, d
    10·1 answer
  • Explain how software is distinct from hardware.
    8·2 answers
  • You are attending to a neighbor who is unresponsive, not breathing normally, and pulseless. Your spouse has left to activate EMS
    8·1 answer
  • Fill in each blank with the correct step from the fetch-execute cycle.
    14·1 answer
  • Running away from home
    11·2 answers
  • Determine the value of a and b at the end of the following code segment:
    12·1 answer
  • are you in active recovery from a substance use disorder (addiction)? active recovery is defined as being free from an alcohol o
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!