Question: Question 9 1 pts Given the following code, a vacation expense tracking simulation: public class VacationBudget { private double amountLeftToSpend; private final double getHomeCost =


Question 9 1 pts Given the following code, a vacation expense tracking simulation: public class VacationBudget { private double amountLeftToSpend; private final double getHomeCost = 1000.0; public VacationBudget (double startingBudget) { amountLeftToSpend = startingBudget; } public void payExpenses (double what something Cost) { amountLeftToSpend = amountLeftToSpend - whatsomethingCost; } public double getAmountLeft() { return amountLeftToSpend; } } What is VacationBudget.java ? constructor field name O method definition file name class name Question 8 1 pts Given the following code, a meal plan expense tracking tool: public class Book { private double price = 10.0; private String title = ""; public Book (double cost, String name) { price = cost; title = name; } public void updatePrice (double bookCost) { price = bookCost } } What is updatePrice (double bookCost) {...} ? field name file name O method definition class name O constructor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
