Can you please take this code and just rewrite it so it can beeasily be able to put into a complier. in java
Implementation of above program in java:
import java.util.HashMap;
import java.util.Scanner;
import java.util.Map.Entry;
public class Shopping_cart {
 Â
  static Scanner s= new Scanner (System.in);
 Â
//Â Â declare hashmap in which key is dates as permentioned and Values class as value which consists all the recordof cases
  static HashMap map= newHashMap<>();
  public static void main(String[] args) {
     // TODO Auto-generated methodstub
     getupdates();
  }
 Â
  static void getupdates() {
    Â
     System.out.println(\"Welcome toShopping Cart. Enter:\");
     System.out.println(\"1 : Add an Item\");
     System.out.println(\"2 : Addmultiples Quantities of Given Item \");
     System.out.println(\"3 : Remove anunspecified Item \");
     System.out.println(\"4 :CheckOut\");
     System.out.println(\"5 :Checkbudget\");
     System.out.print(\"Choice: \");
     int selection= s.nextInt();
    Â
    Â
     switch(selection) {
     case 1:
       add_new_item();
       getupdates();
        Â
       case 2:
          Add_multiples_items();
          getupdates();
           Â
       case 3:
          remove_unspecified_data();
          getupdates();
           Â
       case 4:
             checkout();
             getupdates();
            Â
       case 5:
           Â
          checkbudget();
          getupdates();
              Â
       case 6:
          System.out.println(\"Stay Safe\");
          break;
           Â
          default:
             System.out.println(\"Invalid choice\");
              System.out.println(\"Pleaseenter the valid choice\");
              getupdates();
              Â
     }
  }
  public static int total_price() {
    Â
     int total_price=0;
     for (Entryentry : map.entrySet()) {
             Â
              Itemit=map.get(entry.getKey());
             Â
              total_price+=it.getPrice()*it.get_quantity();
             Â
           }
      Â
     return total_price;
    Â
  }
 Â
 Â
   Â
 Â
  private static void checkbudget() {
    Â
     System.out.print(\"Enter your TotalBudget : \");
     int budget=s.nextInt();
    Â
     int totalprice=0;
 Â
System.out.println(\"Total Amount = \"+total_price());
while(budget  totalprice = remove_unspecified_data();
   Â
   Â
   Â
  if(budget>=totalprice) {
     break;
  }
}
System.out.println();
System.out.println(\"Now updates cart : \");
checkout();
System.out.println();
    Â
  }
  private static void checkout() {
     System.out.println(\" Here list ofItems in Your Cart\");
    Â
     int i=1;
     int total_price=0;
     System.out.println(\" S.no Name ofitem Quantity price \");
     System.out.println(\" \");
     for (Entryentry : map.entrySet()) {
       Â
        Itemit=map.get(entry.getKey());
       Â
        System.out.println(\" \"+i+\" \"+entry.getKey()+\" \"+it.get_quantity()+\"$\"+it.getPrice()*it.get_quantity());
        total_price+=it.getPrice()*it.get_quantity();
        i++;
     }
    Â
     System.out.println();
    Â
     System.out.println(\"Total Amount =\"+total_price);
    Â
     System.out.println();
     System.out.println();
  }
  private static int remove_unspecified_data(){
    Â
     System.out.print(\"Enter the itemyou want to remove from your cart : \");
     String name=s.next();
    Â
     Item it1=map.get(name);
    Â
     int quant=it1.get_quantity();
    Â
     if(quant>1) {
       Â
     quant--;
     it1.set_quantity(-1);
    Â
     map.put(name, it1);
     }
      Â
     else {
        map.remove(name,it1);
     }
    Â
     inttotal_price=total_price();
      Â
     total_price-=it1.getPrice();
      Â
     System.out.println();
     System.out.println();
    Â
     return total_price;
    Â
  }
  private static void Add_multiples_items() {
     System.out.print(\"Enter the itemyou want to add in your cart : \");
     String name=s.next();
    Â
System.out.println(\"Enter price of Item : \");
    Â
     int price=s.nextInt();
    Â
     System.out.print(\"Enter thequantity of that item you want to add : \");
     int quan=s.nextInt();
    Â
     if(map.containsKey(name)) {
        Itemit1=map.get(name);
        it1.set_quantity(quan);
        map.put(name,it1);
     }
     else {
        Item it= newItem(name,price,quan);
        map.put(name,it);
     }
    Â
     System.out.println();
     System.out.println();
    Â
  }
  private static void add_new_item() {
     System.out.print(\"Enter the itemyou want to add in your cart : \");
    Â
     String name=s.next();
    Â
     System.out.println(\"Enter price ofItem : \");
    Â
     int price=s.nextInt();
    Â
    Â
    Â
     if(map.containsKey(name)) {
        Itemit1=map.get(name);
        it1.set_quantity(1);
        map.put(name,it1);
     }
     else {
        Item it= newItem(name,price,1);
        map.put(name,it);
     }
    Â
     System.out.println();
     System.out.println();
    Â
  }
 Â
 Â
}
class Item
{ Â Â
private String name;
private int price;
private int quantity; //in cents
 Â
//Constructor
public Item(String n, int p,int quantity)
{
name = n;
price = p;
this. quantity=quantity;
}
 Â
public boolean equals(Item other)
{
return this.name.equals(other.name) && this.price ==other.price;
}
 Â
//displays name of item and price in properly formattedmanner
public String toString()
{
return name + \", price: $\" + price/100 + \".\" + price%100;
}
 Â
//Getter methods
public int getPrice()
{
return price;
}
 Â
public int get_quantity()
{
return quantity;
}
 Â
public void set_quantity(int qa)
{
  quantity+=qa;
}
 Â
public String getName()
{
return name;
}
}