Foothill College Small Java Project

User Generated

gurbhgfvqre98

Programming

Foothill College

Description


  • Create a new object of type LineChart with a Number x-axis and y-axis
  • Set the title of the series to be descriptive based on the data
  • Define an XYChart.Series
  • Populate the series with data from the instance fc
  • add the series to the LineChart object
  • add the LineChart object to the Scene graph

Unformatted Attachment Preview

package week10_part01.practice; import import import import import javafx.application.Application; javafx.scene.Scene; javafx.scene.chart.LineChart; javafx.scene.chart.NumberAxis; javafx.stage.Stage; /** * Creates a LineChart for Foothill College enrollment history. */ public class ChartEnrollmentHistory extends Application { @Override public void start(Stage stage) { FoothillCollege fc = new FoothillCollege(); stage.setTitle("Enrollment History"); //defining the axes final NumberAxis xAxis = new NumberAxis(); final NumberAxis yAxis = new NumberAxis(); xAxis.setLabel("Year"); xAxis.setForceZeroInRange(false); yAxis.setLabel("Enrollment Count"); // TODO: Complete the definition of LineChart object as follows: // - Create a new object of type LineChart with a Number x-axis and y-axis fc // // // // - Set the title of the series to be descriptive based on the data (see FoothillCollege class) - Define an XYChart.Series - Populate the series with data from the FoothillCollege instance // - add the series to the LineChart object // - add the LineChart object to the Scene graph LineChart lineChart = null; // TODO: Add the lineChart object to the scene. Scene scene = null; } } stage.setScene(scene); stage.show(); public static void main(String[] args) { launch(args); } Enrollment History Foothill College Enrollment History 70,000 65,000 60,000 55,000 50,000 45,000 40,000 Enrollment Count 35,000 30,000 25,000 20,000 15,000 10,000 5,000 0 1955 1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015 2020 Year O Foothill College
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello bro ...


Anonymous
Just the thing I needed, saved me a lot of time.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags