POO and LABI initial commit, IEI reorganization

This commit is contained in:
Tiago Garcia 2023-02-13 18:39:10 +00:00 committed by GitHub
commit fd441aae1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 124 additions and 0 deletions

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

8
1ano/2semestre/poo/.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
</component>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="19" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/poo.iml" filepath="$PROJECT_DIR$/poo.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>

Binary file not shown.

12
1ano/2semestre/poo/README.md Executable file
View File

@ -0,0 +1,12 @@
# Programação Orientada a Objetos
### Projetos + resoluções de exercícios organizados por aulas
### Linguagem usada: [Java](https://www.java.com/en/)
---
## Índice
| Aula nº | Tópicos |
|-------------------------------------------------------------------------------------|----------------------------------------|
| [01](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/poo/aula01) | Introduction, Basics |
---
*Pode conter erros, caso encontre algum, crie um* [*ticket*](https://github.com/TiagoRG/uaveiro-leci/issues/new)

View File

@ -0,0 +1,14 @@
package aula01;
import java.util.Scanner;
public class KmToMiles {
public static void main(String[] args) {
double km, miles;
Scanner sc = new Scanner(System.in);
System.out.print("Insira distância em km: ");
km = sc.nextDouble();
miles = km / 1.609;
System.out.println("A distância em milhas é " + miles);
sc.close();
}
}

View File

@ -0,0 +1,13 @@
package aula01;
public class MyFirstClass {
public static void main(String[] args) {
System.out.println("Hello Eclipse!");
int sum = 0;
for (int i = 1; i <= 100; i++) {
sum += i;
}
System.out.println(sum);
}
}

Binary file not shown.

View File

@ -0,0 +1,16 @@
package aula01;
public class PescadaDeRaboNaBoca {
public static void main(String[] args) {
recursivoSimples(100);
}
public static void recursivoSimples(int x) {
System.out.println(x);
x--;
if (x>0)
recursivoSimples(x);
}
}

View File

@ -0,0 +1,19 @@
package aula01;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class ReadFileExample {
public static void main(String[] args) {
Path fich = Paths.get("major.txt");
try {
Files.readAllLines(fich).stream().forEach(System.out::println);
} catch (IOException e) {
System.out.println("Certifique-se que o ficheiro \"major.txt\" está na raiz da pasta do projeto");
}
}
}

View File

@ -0,0 +1,11 @@
package aula01;
public class StringExample {
public static void main(String[] args) {
String s1 = "programar em Java";
System.out.println(s1.split(" ")[0] + " é engraçado!! :)");
System.out.println("É giro " + s1);
for (int i=0; i<14; i++)
System.out.println("vamos " + s1 + " na aula " + i);
}
}

File diff suppressed because one or more lines are too long