I am doing a payment code. But its not working. How can I make it work?
Edit: Now I have change my code a bit. It can run now but it still didn't print the output I wanted. It only prints 2 lines out of all the output I wanted. I have no idea what was the problem but I think it was at the main part. Any suggestions?
        import java.util.Scanner;
        public class BusPayment {
        public int number_of_adults;
        public int number_of_children;
        public double adult_price;
        public double children_price;
        public double totalprice;
     public BusPayment(){
        }
    public int getnumber_of_adults(){
        return number_of_adults;
    }
    public int getnumber_of_children(){
        return number_of_children;
    }
    public double getadult_price(){
        return adult_price;
    }
    public double getchildren_price(){
        return children_price;
    }
    public double gettotal_price(){
        return totalprice;
    }
    public void setadult_price(double adult_p){
        adult_price=adult_p; 
    }
    public void setchildren_price(double children_p){
        children_price=children_p;
    }
     public void settotalprice(double total_price){
        totalprice=total_price;
    }
    public BusPayment(double adult_p, double children_p){
        adult_price=adult_p;
        children_price=children_p;
    }
    public void BusPaymentPart(){
       number_of_adults=0;
       number_of_children=0;
       adult_price=15.00;
       children_price=10.00;
       totalprice=0.00;
    } 
    public double calculate_totalprice(){
    number_of_adults= 0;
    number_of_children= 0;
    totalprice= (number_of_adults*adult_price)+ 
   (number_of_children*children_price);
    return totalprice;
        }
        public static void main (String []args){
    BusPayment test = new BusPayment();
    Scanner input=new Scanner(System.in);
System.out.println("Payment");
System.out.println("The price of an adult ticket is RM15.00.");
    System.out.println("The price of a children's ticket is RM10.00.");
    int number_of_adults=input.nextInt();
    System.out.println("The number of adults are: " +number_of_adults);
    number_of_adults=input.nextInt();
    int number_of_children=input.nextInt();
    System.out.println("The number of children are: "+number_of_children);
    number_of_children=input.nextInt();
    double totalpri = test.calculate_totalprice();
    System.out.println("The total price you need to pay: " +totalpri);
}
}
I wanted the output to be like:
The price of an adult ticket is 15.00. (this was printed)
The price of a children's ticket is 10.00. (this was printed)
The number of adults are:
The number of children are:
The total price you need to pay:
Payment Successful!