Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

Students also viewed these Databases questions

Question

=+ how might this lead to faster growth in productivity?

Answered: 1 week ago