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
dem82 [27]
3 years ago
5

Suppose you have a class called Child with an instance data value called weight and height. Then it has a method called doubleWe

ight that stores a local double variable called superWeight that multiplies the two instance variables and stores the value in superWeight, and this method returns a double value. Write a getter method and a setter method for weight, and then make them for height.
Computers and Technology
1 answer:
alexira [117]3 years ago
7 0

Answer:

Explanation:

The following code is written in Java. I recreated the entire Child class as described with the instance variables and the doubleWeight method. Then created the getter and setter methods for both the weight and height variables.

class Child {

   double weight, height;

   public double doubleWeight() {

       double superWeight = weight * height;

       return superWeight;

   }

   public double getWeight() {

       return weight;

   }

   public void setWeight(double weight) {

       this.weight = weight;

   }

   public double getHeight() {

       return height;

   }

   public void setHeight(double height) {

       this.height = height;

   }

}

You might be interested in
Test if value is not less than 13.6.
svetoff [14.1K]

value = whatever you want

if not value < 13.6:

   print("Value is greater than or equal to 13.6.")

else:

   print("Value is less than 13.6.")

5 0
3 years ago
How to make a 'Sign in with replit' button in replit (Node.js) will make brainliest
Y_Kistochka [10]

hit the sign in botten or create new account

3 0
3 years ago
Read 2 more answers
PLC software does not typically fail or break​
nydimaria [60]

Answer:

Good to know

Explanation:

:)

7 0
3 years ago
What are the advantages of AI?????
mr Goodwill [35]
AI is a technology that can do thing that humans are doing. So in future humans don’t have to these AI will do it for us.
4 0
4 years ago
Write a program that prompts the user to enter a date, using integer values for the month, day, and year, and then prints out th
attashe74 [19]

Answer:

import datetime

user = input("Enter date in yyyy,m,d: ").split(",")

int_date = tuple([int(x) for x in user])

year, month, day =int_date

mydate = datetime.datetime(year, month, day)

print(mydate)

x = mydate.strftime("%B %d, %Y was a %A")

print(x)

Explanation:

The datetime python module is used to create date and time objects which makes it easy working with date-time values. The user input is converted to a tuple of integer items, then they are converted to date time objects and parsed to string with the strftime method.

5 0
3 years ago
Other questions:
  • What term is used to describe a function that uses an algorithm to convert an input of letters and numbers into an encrypted out
    9·1 answer
  • "You are setting up a new subnetwork on an existing network. Management has asked that you use existing cabling that the company
    14·1 answer
  • What type of undocumented yet benign hidden feature launches after a special set of commands, key combinations, or mouse clicks?
    15·1 answer
  • Which functions are examples of logical test arguments used in formulas? Check all that apply. OR IF SUM COUNT NOT AND
    12·2 answers
  • Select four tasks associated with operating system maintenance. Cleaning inside the computer Defragmenting the hard drive Deleti
    11·1 answer
  • Compare gigabytes GB, kilobytes and terabytes.​
    11·1 answer
  • Briefly explain how Riboflavin deficiency lead to disease state.​
    15·1 answer
  • If every company is now a technology company, then what does this mean for every student attending a business college
    8·1 answer
  • How would a barcode reader be used in a healthcare industry?​
    6·1 answer
  • When is it appropriate to utilize the nat network connection type?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!