Giter VIP home page Giter VIP logo

java-programming-masterclass's Introduction

Java Programming MasterClass

This Repository Consist of Program Codes and Conceptual Material for the Course Java Programming MasterClass for Software Development on Udemy Learn Java In This Course And Become a Computer Programmer. Obtain valuable Core Java Skills And Java Certification

Course Structure

  • Section 1: Course Introduction
  • Section 2: Software Tools Setup
  • Section 3: First Steps
  • Section 4: Java Tutorial: Expressions, Statements, Code blocks, Methods and …
  • Section 5: Control Flow Statements
  • Section 6: OOP Part 1 - Classes, Constructors and Inheritance
  • Section 7: OOP Part 2 - Composition, Encapsulation, and Polymorphism
  • Section 8: Arrays, Java inbuilt Lists, Autoboxing and Unboxing
  • Section 9: Inner and Abstract Classes & Interfaces
  • Section 10: Java Generics
  • Section 11: Naming Conventions and Packages. static and final keywords
  • Section 12: Java Collections
  • Section 13: JavaFX
    • Controls And Components
    • Event And EventHandler
    • Thread And Runnable
    • SceneBuilderUI
    • TODO List Application
    • Contact Application
  • Section 14: Basic Input & Output including java.util
    • Exception & Input-Output
    • Java NIO
    • Absolute & RekativeRead
    • FileSystem, Path, Directories
    • Chained Put Method
    • File Channel
  • Section 15: Concurrency in Java
    • Thread & Runnable
    • Mulitple Thread
    • Thread Pools
    • Producer-Consumer Scenario
    • DeadLock
    • Starvation
    • JavaFX Background Task
  • Section 16: Lambda Expressions
    • Lambda Expression
    • Streams
    • ButtonFX
  • Section 17: Regular Expressions
    • Regular Expression
    • Challenge
  • Section 18: Debugging and Unit Testing
  • Section 19: Databases
    • TestDB
    • MusicUI Application
  • Section 20: Java Networking Programming
  • Section 21: Java 9 Module System
  • Section 22: Migrating Java Projects to Java 9
  • Section 23: Course Remaster in Progress
  • Section 24: Archived Videos

Practice Exercise Codes

  • Speed Converter
  • MegaBytesConerter
  • Barking Dogs
  • Leap Year
  • Decimal Comaparator
  • Teen Number Checker
  • Area Calculator
  • Minute-to-Year days
  • Inequity Calculator
  • Playing Cat
  • Sum 3-5 Challenge
  • DigitSum Challenge
  • BiilBurger

Projects

  • Adventure Game
  • Visited Places Application
  • TODO List Application
  • Contact Application
  • MusicUI Application
  • Bank Account
  • Task-Employee Application

java-programming-masterclass's People

Contributors

ashleshk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

java-programming-masterclass's Issues

Advice for "042_Compositions"

Hello again, I have a recommendation for 042_Compositions:The motivation lies in the fact that you want the system / application to have an interface for the creation of families of related objects without there being a dependency on the specific classes of these objects to promote future extensibility. For the present project, there are classes "Monitor", "Motherboard" and "Case" which are concrete classes used by a class "Computer" in its constructor. These concrete classes are families that are related to being components of a computer, and they can also have variations - cite High Range or Low Range as an example. By implementing Abstract Factory, these variations can be created to create Computers with high-end and low-end components -citing it as an example-, through a creation interface without depending on specific classes, favoring the extensibility of the system and reducing the coupling between classes .
Blank diagram (11)

Advice for "045_BillyBurger"

Hi again. I was checking the code that you use for "045_BillyBurger" and I think about something you can use: Well, you want to operate with hamburgers with the class "Hamburger" where within it are different attributes of type String representing the additional ones with which to order the hamburger, be they drinks, potatoes, etc. And Hamburger's heritage branch does the same. Since being as Strings the functionality is limited, implementing the Composite pattern would be able to operate the hamburgers together with their additional ones as simple objects if desired or work them as a single as a "combo" through a recursive composition where a in turn, the client could operate with these types of objects indistinctly, citing as an example the calculation of the total to pay for all the food ordered. I add the uml class diagram to illustrate the design:
Copy of Blank diagram (1)
Hope you're fine and have a nice day

Code Smell: Long Method in "BillyBurger"

Hello again. I was checking something, and notice something: In the Hamburger class (where the code smell Data Clumps was reviewed) there is a method called itemisedHamburger (), which allows to calculate the total price to pay for the hamburger and its extras. The way in which the method to calculate the total to pay is implemented tends to have a method with very long code which reuses code in a bad way by having to validate each of the additional ones. You can refactor your code by ussing Substitute Algorithm. With this technique, the size of the code would be greatly reduced by not having to reuse code in a bad way through validations through if blocks for each of the additional ones, avoiding repeating the code unnecessarily. To consolidate the change in the first instance, a field is added as a list that will allow storing the additional ones and in turn the number of additional ones is deleted along with their methods to only leave the aforementioned list and an addAditional () method is added so additional ones are added to the list, thus avoiding having many methods with similar algorithms:

The field for the additionals (Don't forget to initializate it) and my proppose for the code:

  private ArrayList<HamburgerAdditional>listAdditional;
  public void addAddition(HamburgerAdditional addition) {
	if(this.listAdditional.size()>3) {
		System.out.println("The Standard Hamburguer can only have 4 additionals");
	}
	else {	
    this.listAdditional.add(addition);
	}
}

public double itemisedHamburger() {
    double subTotal = this.basePrice;
    System.out.println("Total price of "+ this.name+ " burger made from "
            + this.breadRollType+ " and "+ this.meat+ ":");
    System.out.println("base price: " + this.basePrice);
 
    for(HamburgerAdditional x: this.listAdditional) {
    	if(x != null) {
    		subTotal += x.getPrice();
            System.out.println("additional " + x.getName()+ ": "+ x.getPrice()
                    + " subtotal: "+ (double) Math.round(subTotal * 100) / 100);		
    	}  	
    }
    return Math.round(subTotal * 100)/100;

}

Have a nice day

Advice for "Inheritance-Challenge"

Hello. Happy New Year. Checking the code I come up with something you can consider for the Inheritance-Challenge: You want to build a car using the “Car” class, but this can have different representations (variations according to its brand, model, etc.) as can be seen in the “Outlander” class where this is a car with certain special characteristics that inherits from "Car". Since to build a car you can use a standard creation process with variations depending on the specific type of vehicle you want to create and in order to avoid creating n classes for n representations through inheritance or calls to constructors with many parameters (scent code), the use of the Builder pattern is proposed to use the same construction process (code) to create different representations of the various cars in a more flexible way.
Blank diagram (9)

Code Smell: Data Clumps in "BillyBurger"

Hello again. I hope you're doing fine. I was checking your code again and I come up with something. In the Hamburger class there are several related fields that are repeated over and over again, such as the name of the add-on and its price. generate a kind of duplicate code, for example, the methods to define the add-ons are repeated for each add-on name-price pairs. In turn, these groups of variables always act together and without one, the other would be meaningless for the class. So, you can refactor your code by usin Extract Class. Since these groups of variables are already contained within a class, it would facilitate the understanding of the code and its organization by not having the variables dispersed throughout the class. In turn, organizing them within a class allows the size of the code to be reduced and even, if you want to perform some type of operation with groups of variables, this will be easier since the variables now belong to a class as such. Once the class is extracted, the variables are replaced by calls to the objects of the HamburgerAdditional class. Code for the new class:

    public class HamburgerAdditional {
         public String name;
         public double price;

public HamburgerAdditional(String name, double price) {
	this.name=name;
	this.price=price;
}

public String getName() {
	return this.name;
}

public double getPrice() {
	return this.price;
}

public void setName(String name){
	this.name=name;
}

public void setPrice(double price) {
	this.price=price;
}

public String toString() {
	return "Adittional: "+name+" - "+price;
}

}
Have a nice day!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.