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 8599179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:20:17+00:00 2026-06-12T01:20:17+00:00

In the example on this page: http://www.scala-lang.org/node/125 class Point(xc: Int, yc: Int) { val

  • 0

In the example on this page: http://www.scala-lang.org/node/125

class Point(xc: Int, yc: Int) {
  val x: Int = xc
  val y: Int = yc
  def move(dx: Int, dy: Int): Point =
    new Point(x + dx, y + dy)
}

class ColorPoint(u: Int, v: Int, c: String) extends Point(u, v) {
  val color: String = c
  def compareWith(pt: ColorPoint): Boolean =
    (pt.x == x) && (pt.y == y) && (pt.color == color)
override def move(dx: Int, dy: Int): ColorPoint =
  new ColorPoint(x + dy, y + dy, color)
}

What purpose does the argument/parameter list on the extended class serve in the definition of the subclass? I am referring to the (u, v) on the end of Point in the line class ColorPoint(u: Int, v: Int, c: String) extends Point(u, v) {.

  • 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-12T01:20:18+00:00Added an answer on June 12, 2026 at 1:20 am

    If you familiar with Java this code would be identical:

    class ColorPoint extends Point {
      ColorPoint (int u, int v, String c) {
        super(u,v);
      ...
      }
      ...
    }
    

    So, yes, it is call to super’s constructor

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

Sidebar

Related Questions

I read this page: http://www.opengl.org/wiki/GlGetString For example, if the extension GL_EXT_pixel_transform_color_table is listed, doing
I want to subscribe to a facebook page for example with this url ,http://www.myurl.com
I am trying to understand some example code on this web page: ( http://www.csharp-station.com/HowTo/HttpWebFetch.aspx
As i saw on this page http://www.labnol.org/internet/embed-youtube-videos-logoless/19532/ about how to hide youtube logo from
I have following problem. I have a team page like this example: http://www.social-markets.de/social-commerce-team.html small
The imagemagick site has a demo on this page: http://www.imagemagick.org/Usage/resize/#resize I want to perform
There is an image slider at the top of this page: http://www.example.com/ Each slide
I read this page: http://www.djangoproject.com/documentation/models/custom_pk/ , and the example doesn't list unique=True. I'm wondering
I'm trying to set up the spring AOP example from this page: http://www.javabeat.net/articles/51-introduction-to-springs-aspect-oriented-programminga-4.html I'm
I have an issue with character encoding: I have this page: http://www.studiomille.jp/class/ (its in

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.