public class QuotationItem { private String code; private int… Image transcription textWrite a program to read quotation detail from a ?le

public class QuotationItem { private String code; private int… Image transcription textWrite a program to read quotation detail from a ?le, allowuser to make changes and save the updated quotationto another ?le. A quotation includes multipl… Show more… Show morepublic class QuotationItem { private String code; private int quantity; private double price; private double discount;  public QuotationItem(String code, int quantity, double price, double discount){  this.code = code;  this.quantity = quantity;  this.price = price;  this.discount = discount; }  public String getCode() {  return code; }  public void setCode(String code) {  this.code = code; }  public int getQuantity() {  return quantity; }  public void setQuantity(int quantity) {  this.quantity = quantity; }  public double getPrice() {  return price; }  public void setPrice(double price) {  this.price = price; }  public double getDiscount() {  return discount; }  public void setDiscount(double discount) {  this.discount = discount; }  public double getTotal() {  if(discount == 0) {   return getQuantity()*getPrice(); } else {  return getQuantity()*getPrice()*getDiscount(); }     }  public String toString() {   return String.format(“Code: %s, Quantity: %d, Price: $%.2f, Discount: %.2f”,                getCode(),                getQuantity(),                getPrice(),                getDiscount()                ); }} import java.io.*;import java.util.Scanner;import java.util.ArrayList;import java.util.List;public class Lab5 {   public static void main(String[] args){       List items = new ArrayList<>();    try {     FileReader input = new FileReader(“input.txt”);        // Reads characters        input.read();        System.out.println(“Unedited Data: “);        System.out.println(items);        // Closes the reader        input.close();      }      catch(Exception e) {        e.getStackTrace();      }              do {   System.out.println(“Menu”);   System.out.println(“1. Adjust price and discount “);   System.out.println(“2. Show all items “);   System.out.println(“3. Save and quit”);   Scanner sc = new Scanner(System.in);     int choice = sc.nextInt();   String ch;   int flag; switch(choice) {   case 1:      System.out.println(“Enter the product code “);             String code = sc.next();             System.out.println(“Enter the price “);             double price = sc.nextDouble();             System.out.println(“Enter the discount “);             double discount = sc.nextDouble();                          FileInputStream fis = new FileInputStream(“input.txt”);             Scanner scan = new Scanner(fis);             while (sc.hasNext()) {              String line = sc.nextLine();              String []ar = line.split(“,”);                            if(ar[0].equals(code)) {               flag = 1;                              QuotationItem qi = new QuotationItem((ar[0]),Integer.parseInt(ar[1]),price,discount);               double Total = qi.getTotal();               String supdate = ar[0] + “,” + ar[1] + “,” + price + “,” + discount + “,” + Total;               FileWriter output;               output = new FileWriter(“edit.txt”,true);               output.append(supdate);               output.flush();               output.close();               System.out.println(qi);              }             }             if (flag == 0)              System.out.println(“Code not foundn”);             break;                 case 2:    Scanner scanner = null;         try {             File file = new File(“input.txt”); // java.io.File             sc = new Scanner(file);     // java.util.Scanner             String line;             while (sc.hasNextLine()) {               line = sc.nextLine();               // process the line             }           }           catch(FileNotFoundException e)           {               e.printStackTrace();           }           finally {             if (sc != null) sc.close();           }                  case 3:    System.exit(0);      default:          System.out.println(“Invalid Optionn”);   }   System.out.println(“Repeat menu options(yes/no)n”);  ch = sc.next();  }while(ch.equalsIgnoreCase(“yes”));      }}       This is my current code idk how to debug it to get the results. Please help                                                                                                                                                                                                                                                                                                                Computer Science Engineering & Technology Java Programming CSIT 111 Share QuestionEmailCopy link