Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8364353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:24:41+00:00 2026-06-09T12:24:41+00:00

I’m working on an exercise for my course and I’ve stumbled upon a problem

  • 0

I’m working on an exercise for my course and I’ve stumbled upon a problem through the coding. I’m supposed to make an extended class and I think the problem I’m having is the parameter I’m giving for the constructor.

Here is the direct superclass:

public class ElectricalComponent extends Component 
{ 
  private int myMinRating, 
              myMaxRating; 
      
  public ElectricalComponent( String partNumber, int versionNumber, int minRating, int maxRating ) 
  { 
    super( "Electrical", partNumber, versionNumber ); 
    myMinRating = minRating; 
    myMaxRating = maxRating; 
  } 

  public int getMinRating() { return myMinRating; } 
  public int getMaxRating() { return myMaxRating; } 
}

And here is the class I’m working on:

public class HighvoltageComponent extends ElectricalComponent
{
  private int myMinRating, myMaxRating;

  public HighvoltageComponent( String partNumber, int versionNumber)
  {
    super( "Electrical", partNumber, versionNumber );
    myMinRating = 50000;
    myMaxRating = 200000;
  }

}

My problem is in the subclass where it says : "HighvoltageComponent ( String … ) "

When I run the main class which is

public static void main( String[] args )
{
  // test your code here
  Component a = new HighvoltageComponent( "HV12", 0 );

  System.out.println( a.toString() );
  System.out.println( a.getTypeName() );
  System.out.println( a.getPartNumber() );
  System.out.println( a.getVersionNumber() );
}

I get the error that says

"HighvoltageComponent.java:9: cannot find symbol

symbol : constructor ElectricalComponent(java.lang.String,java.lang.String,int) "

Why is this happening?

Also, could you please tell me if I’m doing this question the right way? This is the question:

A HighvoltageComponent is an ElectricalComponent with a minimum rating of 50000 and a maximum rating of 200000. Complete the following definition of HighvoltageComponent. (You will need to insert code at more than one place in the code area below.)

Thanks, Rohan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:24:42+00:00Added an answer on June 9, 2026 at 12:24 pm

    ElectricalComponent constructor requires four parameters, you passed only three params in call super( "Electrical", partNumber, versionNumber ); in HighvoltageComponent class

    You super call should be something like this

    super( partNumber, versionNumber,myMinRating ,myMaxRating );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am currently running into a problem where an element is coming back from
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I am trying to loop through a bunch of documents I have to put
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.