Skip to content

Instantly share code, notes, and snippets.

View justRes3t's full-sized avatar

Chris justRes3t

  • 02:28 (UTC -06:00)
View GitHub Profile
package module15assignment1;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.event.ActionEvent;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.StackPane;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.*;
import javafx.stage.Stage;
@justRes3t
justRes3t / gist:e7a90359dbf042606af1ce025a660a86
Last active November 29, 2016 02:05
Random matrix with button controls
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.*;
import javafx.stage.Stage;
public class CoffeeCalculations extends Module4Assigment1 {
final double PRICE_PER_POUND = 5.99;
final double TAX_RATE = 0.0725;
public double getSale(double PRICE_PER_POUND, double numberOfBags){
double finalSale = 0;
finalSale = (PRICE_PER_POUND * numberOfBags);
return finalSale;
public class CoffeeCalculations extends Module4Assigment1 {
final double PRICE_PER_POUND = 5.99;
final double TAX_RATE = 0.0725;
public double getSale(double PRICE_PER_POUND, double numberOfBags){
double finalSale = 0;
finalSale = (PRICE_PER_POUND * numberOfBags);
return finalSale;
@justRes3t
justRes3t / Output not lined up
Created November 9, 2016 09:53
Output not lined up
Inventory Table:
Item Name: Item Price Final Cost
radio 42.0 54.6
computer 100.0 130.0
headphones 24.0 31.200000000000003
rocks 5.0 6.5
candy 3.0 3.9000000000000004
tv 100.0 130.0
speaker 33.0 42.9
bowls 10.0 13.0
/*
* Design a program to accept ten items the user enters with prices.
* The names and items are stored in two parallel arrays.
* Output the names of the items, item raw costs, and item prices calculated with formula
* itemCost(X)*1.3 in a table form with columns titled "Item Name" above names and
* "Item Costs" about raw costs and "Item Price" about prices.
*/
import java.util.Scanner;
public class Module3Assignement2 {
/*
* Design a program to accept ten items the user enters with prices.
* The names and items are stored in two parallel arrays.
* Output the names of the items, item raw costs, and item prices calculated with formula
* itemCost(X)*1.3 in a table form with columns titled "Item Name" above names and
* "Item Costs" about raw costs and "Item Price" about prices.
*/
import java.util.Scanner;
public class Module3Assignement2 {