Assignment #12 Variables and Names

Code

    /// Name: Koosha Kimelman
    /// Period: 7
    /// Program Name: Numbers and Math
    /// File Name: VariablesAndNames.java
    /// Date Completed: 9/11/15
    
        public class VariablesAndNames {
        
        public static void main( String[] args ) {
        
            int cars, drivers, passengers, cars_not_driven, cars_driven;
            double space_in_a_car, carpool_capacity, average_passengers_per_car;
    
            // I'm writing a comment here about something to do with variable assignments
            cars = 100;
            
            // And it's above each variable assignment
            space_in_a_car = 4.0;
            
            // I get that this assigns values to these terms
            drivers = 30;
            
            // Which can be used as shortcuts for calculations
            passengers = 90;
            
            // And yeah this variable is determined by a calculation make from two other variables
            cars_not_driven = cars - drivers;
            
            // I would hope that you have the name number of drivers and cars to be driven
            cars_driven = drivers;
            
            // More calculations using other variables previously created
            carpool_capacity = cars_driven * space_in_a_car;
            
            // And even more of these calculations
            average_passengers_per_car = passengers / cars_driven;
    
    
            System.out.println( "There are " + cars + " cars available." );
            System.out.println( "There are only " + drivers + " drivers available." );
            System.out.println( "There will be " + cars_not_driven + " empty cars today." );
            System.out.println( "We can transport " + carpool_capacity + " people today." );
            System.out.println( "We have " + passengers + " to carpool today." );
            System.out.println( "We need to put about " + average_passengers_per_car + " in each car." );
        }
    }
    

Picture of the output

Assignment 12