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]
2 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]2 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
As a bank employee, you often work from home and remotely access a file server on the bank’s network to correct errors in financ
strojnjashka [21]

Answer:

TACACS+

Explanation:

Terminal Access Controller Access-Control System Plus (TACACS+) is a protocol that provides detailed accounting information and flexible administrative control over the authentication, authorization, and accounting process.

3 0
3 years ago
You are to calculate the property tax for tax payers. You will ask the county tax clerk if they want to run the program and init
andre [41]

Answer:

Explanation:

The following code is written in Java. It creates the loop as requested and validates the information provided before continuing, if the information is invalid it prints "Invalid Information to the screen" and asks the user to enter the information again. Finally, outputing all the requested information at the end of the program. The code has been tested and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int totalValues = 0;

       int totalTaxes = 0;

       int count = 0;

       while(true) {

           int lotNumber, value;

           double tax;

           System.out.println("Would you like to add an Entry: 1=Yes 0=No");

           int answer = in.nextInt();

           if (answer == 1) {

               System.out.println("Please enter lot number: ");

               lotNumber = in.nextInt();

               if ((lotNumber >= 0) && (lotNumber <= 999999)) {

                   System.out.println("Please enter assessed value: ");

                   value = in.nextInt();

                   tax = value * 0.05;

                   System.out.println("Lot Number: " + lotNumber);

                   System.out.println("Property Value: " + value);

                   System.out.println("Property Tax: " + tax);

                   totalTaxes += tax;

                   totalValues += value;

                   count += 1;

               } else {

                   System.out.println("Invalid Lot Number");

               }

           } else {

               break;

           }

       }

       int average = totalTaxes / count;

       System.out.println("Total Property Values: " + totalValues);

       System.out.println("Total Property Taxes: " + totalTaxes);

       System.out.println("Average Property Tax" + average);

   }

}

8 0
2 years ago
Write all the hexadecimal numbers in sequence from 9F7H to A03H
Harlamova29_29 [7]

Answer:

(9F7, 9F8, 9F9, 9FA, 9FB, 9FC, 9FD, 9FE, 9FF, A00, A01, A02, A03)

Explanation:

(9F7)_{16} =  (2551)_{10}

(A03)_{16} = (2563)_{10}

This means that we must find all hexadecimal values from 2551 to 2563, or 9F7 to A03. You can convert from decimal to hexadecimal for each one, or just count.

5 0
3 years ago
While investigating the settings on your SOHO router, you find two IP addresses reported on the device’s routing table, which is
Semenov [28]

Answer:

Explanation:

Always the getaway is the first device in a network, and for that was assigned this IP address 192.168.2.1, is the first address of the block, a network getaway gives us interoperability between networks and contains devices, and is a protocol translator, this is a piece of hardware used for telecommunication networks.

8 0
3 years ago
What is the most complex part of a PC?
rjkz [21]

Answer:

From a hardware standpoint, the CPU is most likely the main component. From a software standpoint, macOS and Windows are complex software systems.

Explanation:

6 0
2 years ago
Other questions:
  • After calling the customer service line of Delta airlines, Francis received an email asking her to fill out customer satisfactio
    9·1 answer
  • An IT technician has manually configured an IP address on a laptop for a new employee. Each time the employee tries to connect t
    8·1 answer
  • Is bit stuffing necessary in the control or address field in theHDLC protocol? why?
    13·1 answer
  • I have a cosmetology essay due in 2 hours and i’m still on the research , please help .
    13·1 answer
  • When you align or size a group of selected controls, the changes are made relative to the
    14·1 answer
  • Study the sentences below. A.Changing the properties of characters in a sentence or paragraph in a Word document helps increase
    5·2 answers
  • What is the CPU's role?
    15·2 answers
  • A researcher is interested in learning more about the different kinds of plants growing in different areas of the state she live
    8·1 answer
  • Write an algorithm to verify a number as even​
    9·1 answer
  • If you want to join all of the rows in the first table of a SELECT statement with just the matched rows in a second table, you u
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!