13
answers
0
watching
377
views
23 May 2018
(d) Suppose there is a class Book Store and inside this, is a method with the following header: public boolean stockWarehouse (String filename) throws Not EnoughFunds Exception You then write the following code inside the class Shoppingmall: 1 import java.util.Scanner; 3 public class Shoppingmall sous- public initialize void initialize(String[] args) Bookstore indigo - new Bookstore); Scanner reader - new Scanner (System.in); System.out.println("Please enter the file with the list of contents to buy."); String Filename - reader.nextLine(); indigo.stockWarehouse (filename) However, you get the following crror: Shoppingmall.java:10: unreported exception Not EnoughFundsException; must be caught or declared to be thrown indigo.stockWarehouse (filename); 1 error 1)Explain why the error occurs and write the code to fix it.
(d) Suppose there is a class Book Store and inside this, is a method with the following header: public boolean stockWarehouse (String filename) throws Not EnoughFunds Exception You then write the following code inside the class Shoppingmall: 1 import java.util.Scanner; 3 public class Shoppingmall sous- public initialize void initialize(String[] args) Bookstore indigo - new Bookstore); Scanner reader - new Scanner (System.in); System.out.println("Please enter the file with the list of contents to buy."); String Filename - reader.nextLine(); indigo.stockWarehouse (filename) However, you get the following crror: Shoppingmall.java:10: unreported exception Not EnoughFundsException; must be caught or declared to be thrown indigo.stockWarehouse (filename); 1 error 1)Explain why the error occurs and write the code to fix it.
28 Jun 2023
Already have an account? Log in
marcusnicole284Lv10
16 Jun 2023
Already have an account? Log in
celluarsolLv10
7 Mar 2023
Already have an account? Log in
papayaprofessorLv10
5 Sep 2022
Already have an account? Log in
Reid WolffLv2
26 May 2018
Already have an account? Log in