public class ProductManager {
public void save(File f) {
ObjectOutputStream oos = null;
try {
oos = new ObjectOutputStream(new FileOutputStream(f));
Scanner input = new Scanner(System.in);
System.out.println("Please input prodcutID");
String id = input.next();
System.out.println("Please input prodcut name:");
String name = input.nextLine();
System.out.println("Please input the price:");
double price = input.nextDouble();
System.out.println("Please input the nunmer:");
int count = input.nextInt();
Product p = new Product(id, name, count, price);
oos.writeObject(p);