Skip to content

iosifidis/myJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

My JAVA programs

University assignments

  1. BlackJack
  2. CrimeNet
  3. CrimeNet-Pamakbook: Add GUI.
  4. CrimeNet-Graph: Added graph using the libraries jung. The documentation page has an issue, so see here.

JAVA programs. Those helped to learn JAVA

  • Products_(notOO): Program that calculates which is the best product. Example as procedural programming.
  • ProductsWithClasses: The same program as before. Here a class Product is created and all functions that were inside main are transferred and converted into methods.
  • University_2_11: Student example. Here we use several constructors and use of set (set a value) and get (read a value) methods.
  • University_9_11: Program with student object. Entering a table with courses and printing a table with students enrolled in the course.
  • University_9_11_v2: Working with ArrayList with students, courses, rooms and secretariat. Create object students, courses and rooms. Designation of rooms for each course. Enroll students in courses and then print course details. Create a secretariat object and register courses. Print secretarial information.
  • University_16_11: Principle of substitution and polymorphism.
  • Timestamp: Observance of constants (eg time condition 0<= hour < 24 ).
  • Game: Define a static property inside the class so that it is "visible" to all objects (eg a counter on toy soldiers). Also static method to call it, without having created an object in main function. Setting final to a property does not allow anyone to change its value.
  • Bank: Heredity. Overriding or overriding method and protected properties of a superclass for access by other subclasses.
  • University_23_11: Abstract class and principle of substitution with student objects. Method Override.
  • Dataset: Χρήση των αφαιρέσεων (Measurable). Example with the concept of interface.
  • GUI: Introduction to the graphical user interface
  • University_7_12: Example implementation of toString and example of comparing 2 objects (with equals)
  • Students_7_12: Ολοκληρωμένο παράδειγμα με γραφική διεπαφή. Εισαγωγή φοιτητή με όνομα, ταυτότητα και μάθημα και εισαγωγή του σε λίστα φοιτητών (μέσα στην κλάση μάθημα) που πήραν το μάθημα. Στην συνέχεια εμφάνιση του μαθήματος και φοιτητών που πήραν το μάθημα. Επικοινωνία Γραφικής Διασύνδεσης με Κλάσεις Πεδίου προβλήματος.
  • ChessBoard: Example of painting a checkerboard window.
  • Containers_14_12: Containers and Ships example. It is from an old exam period. The graphical interface was added. Two types of containers that are loaded on ships. The window consists of 2 types of containers from 2 buttons (depending on the container) and ship selection. It also shows the total cost in the printout. The list of ships is passed as a parameter from Main to the window constructor.
  • DataStructures1_LinkedList: Εργασία με LinkedLists. Introduction to Iterator to iterate through all data structures.
  • DataStructures2_HashSet: Working with sets. Results are NOT sorted and NOT duplicated.
  • DataStructures3_Conversion: How do I create an ArrayList (contains duplicates) and then create a Collection with a HashSet and insert the ArrayList to extract the duplicates.
  • DataStructures4_SetOperations: Working with sets.
  • DataStructures5_TreeSet: Create a TreeSet (tree) and in the print we notice that the results are sorted.
  • DataStructures6_TreeSetComparable: Create a TreeSet of objects. But it gives an error because it doesn't know how to sort them. So I make a Comparable interface and implement compareTo to sort the objects. Implementation of internal comparators.
  • DataStructures7_TreeSetComparator: Create a TreeSet of objects. Implementation of 2 external comparators.
  • DataStructures8_HashSet: Create a HashSet of 2 identical objects. I have to overlap the hashcode and equals so that it doesn't register the 2 same objects (I have to define, for example, that they are registered based on the id).
  • DataStructures9_Algorithms: Create a Collection ArrayList. Easy way to sort, reverse sort, shuffle, permute order find frequency of occurrence and min-max on ArrayList.
  • DataStructures10_GUI: GUI with a list model to which a scrollbar widget is added. Button event handling is implemented inside main, collapsing the 4 steps.
  • DataStructures12_HashMap: Introduction to hashmaps.
  • LibraryMaps: Simple library program implementation using hashmaps.
  • Charts: Import external libraries (Properties>Java build path>Libraries>Add external jars). Construct window with diagrams.
  • Chess: Filling the chessboard with a pawn that is moved by clicking the mouse.
  • Files_v1: How to write to a text file (ascii).
  • Files_v2: Extension of Files_v1 to read. Open a graphical interface with the open file button. Opens a file selector and then reads the file line by line. The result is printed on the terminal.
  • BinaryFiles_v1: How to write an object to a binary file.
  • BinaryFiles_v2: How to read an object from a binary file.
  • BinaryFiles_v3: How to write an ArrayList of objects to a binary file.
  • BinaryFiles_v4: How to read an ArrayList of objects from a binary file.
  • BinaryFiles_v5: How to write an ArrayList stored with object information attached to objects (employees with cars), to a binary file.
  • BinaryFiles_v6: How to read an ArrayList stored with object information attached to objects (employees with cars), in a binary file.
  • Hotels: Exams. Full example with GUI and ArrayLists etc, with hotels

About

My Java Programs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published