[POO] imports optimization

Optimized imports in:
- aula02
- aula03
- aula06
- aula08
- aula09
- aula11
This commit is contained in:
TiagoRG 2023-05-15 21:28:20 +01:00
parent 85bb7ba8af
commit fe04ea004d
17 changed files with 35 additions and 16 deletions

View File

@ -1,11 +1,9 @@
package aula02; package aula02;
import java.util.Scanner;
// Código da package utils disponível em
// https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/poo/src/utils
import utils.UserInput; import utils.UserInput;
import java.util.Scanner;
// Solução do exercício 5 // Solução do exercício 5
public class AverageSpeed { public class AverageSpeed {

View File

@ -1,6 +1,7 @@
package aula03; package aula03;
import utils.UserInput; import utils.UserInput;
import java.util.Scanner; import java.util.Scanner;
// Solução do exercício 5 // Solução do exercício 5

View File

@ -1,8 +1,9 @@
package aula03; package aula03;
import java.util.Scanner;
import utils.UserInput; import utils.UserInput;
import java.util.Scanner;
// Solução do exercício 4 com o utilizador a introduzir as notas individualmente // Solução do exercício 4 com o utilizador a introduzir as notas individualmente
public class Grades { public class Grades {

View File

@ -1,6 +1,7 @@
package aula03; package aula03;
import utils.UserInput; import utils.UserInput;
import java.util.Random; import java.util.Random;
import java.util.Scanner; import java.util.Scanner;

View File

@ -1,6 +1,7 @@
package aula03; package aula03;
import utils.UserInput; import utils.UserInput;
import java.util.Scanner; import java.util.Scanner;
// Solução do exercício 2 // Solução do exercício 2

View File

@ -2,6 +2,7 @@ package aula03;
import utils.MathTools; import utils.MathTools;
import utils.UserInput; import utils.UserInput;
import java.util.Scanner; import java.util.Scanner;
// Solução do exercício 1 // Solução do exercício 1

View File

@ -1,8 +1,9 @@
package aula03; package aula03;
import java.util.Scanner;
import utils.StringMethods; import utils.StringMethods;
import java.util.Scanner;
public class StringExtras { public class StringExtras {
public static void main(String[] args) { public static void main(String[] args) {
Scanner sin = new Scanner(System.in); Scanner sin = new Scanner(System.in);

View File

@ -1,8 +1,9 @@
package aula06.ex1; package aula06.ex1;
import java.util.Scanner;
import utils.DateYMD; import utils.DateYMD;
import java.util.Scanner;
public class PersonTest { public class PersonTest {
public static void main(String[] args) { public static void main(String[] args) {
Scanner sin = new Scanner(System.in); Scanner sin = new Scanner(System.in);

View File

@ -1,6 +1,7 @@
package aula06.ex1; package aula06.ex1;
import utils.DateYMD; import utils.DateYMD;
import java.time.LocalDate; import java.time.LocalDate;
public class Student extends Person { public class Student extends Person {

View File

@ -1,8 +1,8 @@
package aula08.ex1.Vehicles; package aula08.ex1.Vehicles;
import aula08.ex1.Interfaces.IKmTravelled; import aula08.ex1.Interfaces.IKmTravelled;
import aula08.ex1.VehicleComp;
import aula08.ex1.Main; import aula08.ex1.Main;
import aula08.ex1.VehicleComp;
import utils.Validations; import utils.Validations;
import java.util.Objects; import java.util.Objects;

View File

@ -1,6 +1,7 @@
package aula08.ex2.Dishes; package aula08.ex2.Dishes;
import aula08.ex2.Aliments.Aliment; import aula08.ex2.Aliments.Aliment;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Objects; import java.util.Objects;

View File

@ -1,8 +1,13 @@
package aula08.ex2; package aula08.ex2;
import aula08.ex2.Aliments.*; import aula08.ex2.Aliments.*;
import aula08.ex2.Dishes.*; import aula08.ex2.Dishes.DietDish;
import aula08.ex2.Enums.*; import aula08.ex2.Dishes.Dish;
import aula08.ex2.Dishes.VeganDish;
import aula08.ex2.Enums.AlimentType;
import aula08.ex2.Enums.DishType;
import aula08.ex2.Enums.FishState;
import aula08.ex2.Enums.MeatType;
import utils.Enums.Weekday; import utils.Enums.Weekday;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;

View File

@ -1,6 +1,7 @@
package aula08.ex3; package aula08.ex3;
import aula08.ex3.Interfaces.IPurchase; import aula08.ex3.Interfaces.IPurchase;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
public class Purchase implements IPurchase { public class Purchase implements IPurchase {

View File

@ -1,6 +1,6 @@
package aula09.ex3; package aula09.ex3;
import java.util.*; import java.util.LinkedList;
public class PlaneManager { public class PlaneManager {
private final LinkedList<Plane> planes = new LinkedList<>(); private final LinkedList<Plane> planes = new LinkedList<>();

View File

@ -1,10 +1,13 @@
package aula11.ex1; package aula11.ex1;
import java.io.*; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.*; import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeMap;
public class WordPairCounter { public class WordPairCounter {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -1,10 +1,11 @@
package aula11.ex2; package aula11.ex2;
import java.io.*; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.*; import java.util.Arrays;
import java.util.LinkedList;
public class Gradebook { public class Gradebook {
private final LinkedList<Student> students = new LinkedList<>(); private final LinkedList<Student> students = new LinkedList<>();

View File

@ -1,9 +1,11 @@
package aula11.ex4; package aula11.ex4;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.*; import java.util.*;
import java.io.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
public class FlightManager { public class FlightManager {