> For the complete documentation index, see [llms.txt](https://educacion.gitbook.io/programacion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://educacion.gitbook.io/programacion/exercicios-java/ud5-exercicios/csv.md).

# CSV

1. Define unha clase que represente aos videoxogos almacenados no seguinte CSV, empregando os tipos de datos mais adecuados en cada caso.
   1. Define unha clase para realizar o acceso a datos que conten un método que reciba como parámetro a ruta do CSV e devolva un Array de videoxogos. A lonxitude do array a declarar será de 10.
   2. Define un método actualizarVideoxogos que reciba un array de Videoxogos e actualice o contido do ficheiro
   3. Define un servicio de videoxogos que implementa as operacións de lectura e escritura definidas nos apartados anteriores
   4. Define unha clase App na que se crea un DAO e un Servicio, e a continuación:
      1. Leemos o contido do ficheiro e pintamos por pantalla os videoxogos
      2. Creamos un videoxogo novo e o engadimos no array que recuperamos
      3. Chamamos ao método de escritura do servicio para que actualice o ficheiro.

```
ID,Nome,DataLanzamento,Xenero,Plataforma,Puntuacion
1,The Legend of Zelda,1986-02-21,Aventura,Nintendo,10
2,Super Mario Bros,1985-09-13,Plataformas,Nintendo,9
3,Minecraft,2011-11-18,Creativo,Multiplataforma,8
4,Fortnite,2017-07-25,Battle Royale,Multiplataforma,7
5,Cyberpunk 2077,2020-12-10,RPG,PC,6
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://educacion.gitbook.io/programacion/exercicios-java/ud5-exercicios/csv.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
