logo

Crowdly

Browser

Add to Chrome

DAM-DAW - Programació (repàs)

Looking for DAM-DAW - Programació (repàs) test answers and solutions? Browse our comprehensive collection of verified answers for DAM-DAW - Programació (repàs) at www.insbaixcamp.cat.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

  1. Interfície AtacDistancia - 0,5 punts

Escriu una interfície AtacDistancia que hereti de Combatent i afegeixi:

```java 

 

boolean teMunicio();

int getMunicio();

```
View this question

  1. Interfície Combatent - 0,5 punts

Escriu una interfície Combatent amb aquests metodes:

  ```java

 

int atacar();

void rebreDany(int dany);

boolean estaViu();

String getNom();

```
View this question

  1. Excepcio personalitzada - 0,5 punts

Escriu una excepcio comprovada anomenada PersonatgeInvalidException que hereti d'Exception i tingui un constructor amb missatge.

View this question

  1. Polimorfisme per interfície - 0,75 punts

Escriu un metode:

public static void mostrarTiradors(ArrayList<AtacDistancia> tiradors)

Ha de recórrer la llista i mostrar el nom del tirador i quanta municio li queda.
View this question

Want instant access to all verified answers on www.insbaixcamp.cat?

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

Browser

Add to Chrome