Question: java program, please do it with some coments You are working as a software Developer in a coffee company. Company decided to give franchises. Companies

java program, please do it with some coments java program, please do it with some coments You are working

You are working as a software Developer in a coffee company. Company decided to give franchises. Companies which buy the franchise should use the same type of invoices for the customers. Every company has its own software developer. Now, your duty is to prepare an interface named as GrandCoffee and add createFile(), addItem(), printItems (), total(), and close() void methods. So other developers will use these methods. Design also another class named as BestCoffee that extends the GrandCoffee. It has a private PrintWriter newFile data field and private double price ArrayList. It has a public createFile() method that creates "store.txt" files in D: or E: drive. In the createFile() method, your program should prompt if the path or the file name is not correct (try-catch) and displays "Check the path and file name again:", Add a void addItem() method that adds item name and price to the file. It has also printItems() method that prints the content of the file on the console and (5 POINTS) total() methods that shows the total price of the items with 20% TAX added as shown below. And it has public close() method to save and close the file. User should press "q" to stop entering items. Use the test class below. a Sample output: Item and Price: Metro 50 Item and Price: Lays 100 Item and Price: Metro 50 Item and Price: Notebook 100 Item and Price: store - Notepad File Edit Format View Help Metro 50.0 Lays 100.0 Metro 50.0 Notebook 100.0 Welcome to Mega Super Market Items you bought: Metro 50.0 Lays 100.0 Metro 50.0 Notebook 100.0 300.0 LEK 60.0 VAT TOTAL: 360.0 LEK Test class: FileNotFoundException public class test { public static void main(String[] args) throw { Store file = new Store(); file.createFile(); file.addItem(); file.close(); file.printItems(); file.total()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!