logo

Crowdly

¿Qué código hay que poner en ___[1]___ para implementar el constructor de la...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

¿Qué código hay que poner en

___[1]___ para implementar el constructor de la clase Edge (sin considerar el

control de argumentos de entrada)

public class Vertex<T> {

  private long id;

  private T data;

  public Vertex(long id, T data) { this.id = id; this.data = data; }

  public T getData() { return this.data; }

  public

String

toString() {

return "v" + this.id + "=" + this.data; } 

}

public class Edge<T, V extends Vertex<T>> {

  public V v1;

  public V v2;

  public

Edge(___[1]___)

{

this.v1 = v1; this.v2 = v2; }

  public

String toString()

{

return "[" + this.v1 + "," + this.v2 + "]"; }

}

More questions like this

Want instant access to all verified answers on moodle.uam.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!