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

  • Home
  • SEARCH
  • 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 9010617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:30:36+00:00 2026-06-16T02:30:36+00:00

So i got Graph.java file and there is a method (there is more stuff

  • 0

So i got Graph.java file and there is a method (there is more stuff in there):

public Graph(double y, int gr, String title, double vidurkis, double trend) {
   grooms = gr;
}

And this Graph method is no more mentioned in this Graph.java file. Now after grooms variable becomes = gr = 30. And 30 never mentioned in this Graph.java. So i imagine this method is being called from other file, right?

Now there is BrideInSwing.java file and there is have also Graph method used:

if (which == 1){
   graphic = new Graph((Math.floor(((d_bride+d_groom) * 3 + divorce) * 10)) / 10, grooms, "Number of grooms: " + grooms + "; bride distribution: " + d_bride + "; grooms distribution: " + d_groom, pr_vidurkis, trend);               
} else {
   graphic = new Graph((Math.floor((d_bride + d_groom) * 3 * 10)) / 10, grooms, "Number of grooms: " + grooms + "; bride distribution: " + d_bride + "; grooms distribution: " + d_groom, pr_vidurkis, trend);
}  

So from what i understand this calls Graph method with parameters corresponding in Graph.java file? If so, then why there is more parameters given here than in Graph.java file where it is only 5: y, gr, title, vidurkis, trend.

Or am I completely missing something here? Thanks.

  • 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-16T02:30:37+00:00Added an answer on June 16, 2026 at 2:30 am

    public methods, by definition, are intended to be called from the oustide of the class (they can be called from the inside also, but if that’s the only goal, the method should be private).

    This method, however, is not a method, but a constructor.

    And it’s invoked with 5 arguments:

    1. Math.floor(((d_bride+d_groom)*3+divorce)*10))/10,
    2. grooms,
    3. "Number of grooms: "+grooms+"; bride distribution: "+d_bride+"; grooms distribution: "+d_groom,
    4. pr_vidurkis,
    5. trend

    What’s the most troubling from your code is that the constructor takes 5 arguments, but does nothing with 4 of them. EIther the arguments should be used, or they should be removed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the Flot-created graph. What I wanted to acomplish is to get some
I've got the following deadlock graph that describes two sql statements that are deadlocking
I've currently got prefuse to plot a scatter graph, where the X axis is
I've got a problem with the distances between two nodes of my graph in
Got a programm with 2 threads. one thread is writing some stuff into the
I've got some Java code which builds a data structure (approx 500 small interlinked
I've been looking around for a Java implementation of the force-directed graph layout algorithm
I've got a huge graph with typed edge (i.e. edge with a type property).
I've got a version of the A* algorithm that builds a graph of the
I've got a running java webapp, that I'm monitoring with visualVM . Here's the

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.