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
Gre4nikov [31]
4 years ago
10

What is wrong with the following program and how should it be fixed?

Computers and Technology
1 answer:
Sedbober [7]4 years ago
7 0

Answer:

Their is no MyClassC class is found in the code.

The correct code for the given question isto create a MyClassC  class with parameterized constructor.

The code is given below

public class MyClassC

{

int p;

public MyClassC(int v) // hold the integer value

{

p=v;

}

}// end class MyClassc

Explanation:

According to the code as given in the question in the main method it will call parametrized constructor of MyClassC  but  their is no such kind of class be there so we will create a class MyClassC and also create a parametrized constructor with integer parameter.

The final correct program is given below.

public class MyClassC // class

{

int p;

public MyClassC(int v)

{

p=v;

}

}// end class MyClassC

public class MyClassD

{

public static void main (String args []) // main method

{

MyClassC m = new MyClassC (23);  // call the parametrized constructor of class c

} // end main

} // end class MyClassD

You might be interested in
Write a program to display MPH (Miles per Hour). Create a function to calculate the MPH. Ask the user for the number of miles dr
puteri [66]

Answer:

In Python:

def MPH(miles,minutes):

   mph = round(60 * miles/minutes,1)

   return mph

   

miles = float(input("Miles: "))

minutes = float(input("Minutes: "))

if miles>0 and minutes>0:

   print("MPH: ",MPH(miles,minutes))

else:

   print("Positive inputs only")

Explanation:

This defines the function

def MPH(miles,minutes):

This calculates mph rounded to 1 decimal place

   mph = round(60 * miles/minutes,1)

This returns the calculated mph

   return mph

The main begins here

This gets input for miles    

miles = float(input("Miles: "))

This gets input for minutes

minutes = float(input("Minutes: "))

If miles and minutes are positive

if miles>0 and minutes>0:

This calls the MPH function

   print("MPH: ",MPH(miles,minutes))

If otherwise, this prompts the user for positive inputs

<em>else:</em>

<em>    print("Positive inputs only")</em>

7 0
3 years ago
________ employees state-of-the-art computer software and hardware to help people work better together.
natulia [17]

The correct answer is collaborative computing

Using state-of-the-art computer software and hardware to help people work better together is known as collaborative computing. Goal setting and feedback will be conducted via Web-based software programs such as eWorkbench, which enables managers to create and track employee goals.

6 0
3 years ago
Which character formatting effect makes text appear in a small font size below the midpoint of a line of text
pav-90 [236]

Answer:

Superscript or Subscript

Explanation:

The superscript or the subscript is a type of character which is set a little lower or more than the normal line of type. And it is generally small as compared to the other texts. The subscript does appear at or less than the baseline, and the superscript is above. And for the superscript, you need to press the Ctrl + Shift + + ( press and at the same time also hold the Ctrl and the Shift, and finally press the +). And for the subscript, you need to press the Ctrl + Shift ++(Press and at the same time also hold the Ctrl. and finally press the =). And pressing the corresponding shortcut once again, you will be back to the normal text.

4 0
3 years ago
Is jesus dead or alive
Morgarella [4.7K]

Answer:

Explanation:

i think he alive but in heaven i dunno

8 0
3 years ago
Which of these is a physical health benefit provided by playing team sports? A. a spiritual connection to others B. lower choles
AfilCa [17]

Answer:

B. lowering cholesterol

Explanation:

Edge 2021, made a 100 on the quiz. Good luck :)

3 0
3 years ago
Read 2 more answers
Other questions:
  • How does technology set a negative impact on the adolescent of our society?
    14·1 answer
  • To copy noncontiguous slides, open Slide Sorter view, click the first slide thumbnail, press and hold ____, click each additiona
    15·1 answer
  • What is used to monitor the activity of a network and notify network administrators when it identifies something as suspicious?
    15·1 answer
  • __________ has become a widely accepted evaluation standard for training and education related to the security of information sy
    5·1 answer
  • A USB zipper drive is a small data storage device that plugs into a computer's USB port.
    14·1 answer
  • . Let F(X, Y, Z)=(X + Y + Z)(X + Y + Z)(X + Y + Z)(X + Y + Z). Use a 3-variable K-Map to find the minimized SOP form of this fun
    15·1 answer
  • Write the WordSandwich method allSandwiches. This method creates and returns a new array of String objects as follows. Each elem
    13·1 answer
  • What services are used to help speed the development and deployment of internal custom applications?
    8·2 answers
  • Mobile computing is growing in importance each and every day, and the IT manager must take that into account. Do some web resear
    14·1 answer
  • Which directory contains the initrd file? in suse linux
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!