Gostaria de saber um modo de deixar esse código que fiz para ler o estoque de uma loja mais limpo e seco,o menor possivel com a mesma utilidade
package newexercise;
import java.util.Scanner;
public class Product {
Scanner teclado = new Scanner(System.in);
// Atributos
String name;
double Price;
int Quantity;
int N;
int while1 = 1;
int while2 = 1;
// Métodos
public double TotalValueInStock(){
getPrice();
getQuantity();
System.out.println("Our value in stock is : " + getPrice()*getQuantity() + " Dollars in " + getName());
return 0;
}
public void AddProducts(){
System.out.println("Name of the product: ");
setName(teclado.nextLine());
System.out.println("Price of the product: ");
setPrice(teclado.nextDouble());
System.out.println("Quantity of the products: ");
setQuantity(teclado.nextInt());
System.out.println("Entered " + getQuantity() + " " + getName() + " Whose prices are : " + getPrice() + " Dollars");
}
public void RemoveProducts(){
getQuantity();
while(while1==while2){
System.out.println("Which product would you like to remove? : ");
String Produte = teclado.next();
if (Produte.equals(getName())){
System.out.println("Type the quantity: ");
setN(teclado.nextInt());
}else{
System.out.println("There isn't any product with this name in our stock,sorry!");
while1++;
break;
}
if (getN() > getQuantity()){
System.out.println("Impossible to get,try another quantity smaller");
while1++;
break;
}else{
setQuantity(getQuantity()-getN());
System.out.println(getN() + " " + getName() + " were removed from our stock");
System.out.println("There are " + getQuantity() + " in our stock");
while1++;
break;
}
}
}
// Getter e Setters
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getPrice() {
return Price;
}
public void setPrice(double Price) {
this.Price = Price;
}
public int getQuantity() {
return Quantity;
}
public void setQuantity(int Quantity) {
this.Quantity = Quantity;
}
public int getN() {
return N;
}
public void setN(int N) {
this.N = N;
}
}

