Question: JAVA (Create a BlueJ project named: LabActivityFundamentals) Class: Electric Circuit Class: Electric Circuit Method: Voltage Parameters: Current (data type: double), Resistance (data type: double) Return:

JAVA (Create a BlueJ project named: LabActivityFundamentals)

Class: Electric Circuit

  • Class: Electric Circuit
  • Method: Voltage
  • Parameters: Current (data type: double), Resistance (data type: double)
  • Return:
  • Add Method: Series Resistance
  • Parameters: Resistor (data type: 1 dimensional double array)
  • Return: Equivalent Resistance which is equal to the sum of all values in array Resistor)

Class: Fundamentals Input Output

  • Add Method: Current Input
    • Parameters: None
    • Return: Get user input for the Current (units: amperes)
    • Note: Only accept values that are greater than or equal to zero
  • Add Method: Color Band 4 Input
    • Parameters: None
    • Return: User input for the color

Class: Resistor

  • Declare a field Bands and set its value to 4
  • Create a Method: Tolerance
    • Parameters: Color Band 4 (data type: String)
    • Return: Write the java code segment to set the value of Tolerance based on the value of Color Band 4:
      Color Band 4 Tolerance
      Gold 5
      gold 5
      Silver 10
      silver 10

      Note: Set the Tolerance to -1 for any other value of Color Band 4.

Class: Lab Activity Fundamentals

  • Declare constant Number Of Resistors and set its value to 3
  • Declare double variable Current (units: amperes)
  • Declare double variable Resistance (units: ohms)
  • Declare double variable Voltage (units: volts)
  • Declare double variable Tolerance (units: %)
  • Declare String variable Color Band 4
  • Declare double array Resistor (size: Number Of Resistors, units: ohms)
  1. Create Comment: User Input Call the appropriate method to get user input for Current Call the appropriate method to get user input for Color Band 4
  2. Create Comment: Assignment Statements Set the values of the Resistor array to: 45.2, 33.5, 79.3
  3. Create Comment: Calculating Preliminary Values Call the appropriate method to determine the value of Resistance Display a description and the value of Resistance Call the appropriate method to determine the value of Tolerance Display a description and the value of Tolerance
  4. Create Comment: Calculating Solution Call the appropriate method to determine the value of Voltage Display a description and the value of Voltage

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!