This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <?import javafx.scene.control.Button?> | |
| <?import javafx.scene.control.Label?> | |
| <?import javafx.scene.control.TextField?> | |
| <?import javafx.scene.layout.AnchorPane?> | |
| <AnchorPane minHeight="200.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Challenge5.DistanceTraveledController"> | |
| <children> | |
| <Label layoutX="69.0" layoutY="23.0" text="Speed (mph):" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <?import javafx.scene.control.Button?> | |
| <?import javafx.scene.control.Label?> | |
| <?import javafx.scene.control.TextField?> | |
| <?import javafx.scene.layout.AnchorPane?> | |
| <AnchorPane prefHeight="150.0" prefWidth="200.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Challenge4.TipTaxTotalController"> | |
| <children> | |
| <Label layoutX="14.0" layoutY="14.0" text="Meal Cost: " /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <?import javafx.geometry.Insets?> | |
| <?import javafx.scene.control.Button?> | |
| <?import javafx.scene.control.Label?> | |
| <?import javafx.scene.control.TextField?> | |
| <?import javafx.scene.layout.AnchorPane?> | |
| <AnchorPane prefHeight="350.0" prefWidth="300.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.65" fx:controller="Challenge3.NameFormatterController"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Challenge3; | |
| public class DisplayItems { | |
| public static void main(String[] args) throws InvalidUnitsException, InvalidPriceException { | |
| RetailItem item1 = new RetailItem("Jacket", 12, 59.95); | |
| RetailItem item2 = new RetailItem("Designer Jeans", 20, 34.95); | |
| RetailItem item3 = new RetailItem("Shirt", 20, -24.95); | |
| System.out.printf("Item 1: %s\nUnits: %d\nPrice: %.2f\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Challenge1; | |
| public class Employee { | |
| //Fields | |
| private String name; | |
| private String number; | |
| private String hireDate; | |
| //Constructor | |
| public Employee(String name, String number, String hireDate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Challenge3; | |
| public class Accounts { | |
| int[] accountNumbers = {5658845, 4520125, 7895122, 8777541, 8451277, 1302850, | |
| 8080152, 4562555, 5552012, 5050552, 7825877, 1250255, | |
| 1005231, 6545231, 3852085, 7576651, 7881200, 4581002}; | |
| public boolean checkAccount(int number) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Challenge4; | |
| public class LargerThan { | |
| public String displayLarger(int[] numbers, int n) | |
| { | |
| String largeNumbers = "Numbers greater than " + n + " are"; | |
| for(int x = 0; x < numbers.length; x++) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Challenge6; | |
| public class DisplayEmployee { | |
| public static void main(String[] args) { | |
| //Ch3 Challenge 1 Get/Set & constructors | |
| /* | |
| Employee employee1 = new Employee(); | |
| Employee employee2 = new Employee(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Challenge2; | |
| public class DisplayInventoryItem { | |
| public static void main(String[] args) { | |
| String description = "This is a large Bolt."; | |
| double units = 13; | |
| InventoryItem item1 = new InventoryItem(description, units); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Countable | |
| { | |
| private static int instanceCount = 0; | |
| public Countable() | |
| { | |
| instanceCount++; | |
| } | |
| public int getInstaneCount() | |
| { |
NewerOlder