1 / 37

Install Fest

Install Fest. SSID : XXX, Password : YYY SSID : XXX, Password : YYY. What are the features of a car ?. Four wheels Engine Headlights Windows Seats Doors. What are the features of a car ?. Body color Number of doors Number of seats Sedan or convertible or hatchback DVD player

xuan
Télécharger la présentation

Install Fest

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Install Fest • SSID: XXX, Password: YYY • SSID: XXX, Password: YYY

  2. What are the features of a car ? • Four wheels • Engine • Headlights • Windows • Seats • Doors

  3. What are the features of a car ? • Body color • Number of doors • Number of seats • Sedan or convertible or hatchback • DVD player • GPS • Moon roof • Price

  4. What can a car do ? • Play music • Drive • Crash • Stop

  5. What can a car do ? • Start the engine • Shut the engine • Accelerate • Brake • Turn • Lock the doors • Play the song/movie

  6. Where are related cars sold ?

  7. Types of Cars • Toy car • Race car • Mini van • Trucks • Convertible

  8. Types of Cars • Sedan • SUV • Convertible • Hatchback • Race • Formula One

  9. How is it related to Java ?

  10. Sample Java Class class Car { String color;int door; void startEngine(); void stopEngine();}

  11. How to make a JAR ? – Part 1 Compiles Java Program Class

  12. What does a compiler do ? • Translates Java source code to the language understood by machine • Source code -> Byte code • Looks for errors in source code • Looks for other libraries to be included

  13. How to compile • Java Development Kit (or JDK) • Tool: Java Compiler (javac) • What: Compile Java program • How: javacCar.java • Output: Generates Car.class

  14. How to make a JAR ? – Part 2 010011… Class Class JAR 010011… 010011… Class

  15. How to run • Tool: Java Virtual Machine (java) • What: Runs your Java class • How: java Car.class • Output: Performs actions from your program

  16. Hello Java World

  17. Basic Java Concepts – Interface What can you do with a fruit ? • Eat it • Chuck it in the trash • Plant it • Make a chemical reaction • Make smoothie • Mash it up with a hammer

  18. Basic Java Concepts – Interface What can you do with a fruit ? Not How • Plant it • Water it • Pick from a tree • Peel it • Eat it • Make a smoothie

  19. Basic Java Concepts – Interface Code interface Fruit { peel(); eat(); plant();}

  20. Basic Java Concepts – Interface Example

  21. Basic Java Concepts – API

  22. Basic Java Concepts – Exception What can be wrong with a fruit ? • Rotten • Rotten • Poisonous • Stinky • Fly infested • Worm infested • Spider infested

  23. Basic Java Concepts – Exception What can be wrong with a fruit ? – Exceptional Conditions • Too ripe • Too yellow or green • Too hard or soft • Too sour or sweet • Big pit • Only part of it is good

  24. Basic Java Concepts – Exception Code try {fruit.eat(); } catch (TooRipeException e) { fruit.dontEat();}

  25. Minecraft Mod • What are mods ? • Changes the game content from what it originally was • Add content to the game to alter gameplay • Give more options to players • Client Mod: On the client-side, single player • Server Mod: On the server-side, multiple players

  26. Mods you like • Pokemods • Mcedit • Industrial craft • Too many items • A grenade mod • Super mario mod • Jerry mod

  27. Minecraft is modular • Minecraft is modular • Minecraft world is 1.5x radius of Earth • Space is loaded in chunks • Configurable “Render Distance”: Tiny, Short, Normal, Long

  28. Bukkit • Extends Minecraft • Bukkit is the API to build plugins (aka mods for Minecraft) • CraftBukkit is a mod for the official Minecraft server that implements the API

  29. Sample Mod Java Program Java Program JAR . . . Java Program ConfigurationFile

  30. Build a mod http://java4kids.java.net/minecraft-workshop/ • Step 1: Download and Install Programs • Step 2: Create a Sample Plugin • Step 3: Download and Start CraftBukkit Server • Step 4: Mod the Server using Bukkit API

  31. Resources • New to Java: http://www.oracle.com/technetwork/topics/newtojava/overview/index.html • http://java4kids.java.net

More Related