The program shows three phones with prices, and you need to select one of them. The program will then calculate the price based on the payment type you selected.I'm very new to the world of OOP, and because I'm studying OOP on my own (I actually go to school and we have a computer subject, but I'm taking advance lessons on my own), I have no one to judge my code. I can make programs run, but I'm not sure if I am coding well.Is there a better way I could have written this simple program? What are the conventions that I did not follow? I did my best based on things I read though, but I'm not sure if I missed things.package javaPackage;import java.util.Scanner;import java.text.DecimalFormat;public class OopApproach {    private String model;    private double price;    private double discount;    public OopApproach(String model,int price)    {        this.model=model;        this.price=price;    }    public void setModel( String model )    {        this.model = model;    }    public void setPrice( double price )    {        this.price = price;    }    public static void main( String args[] )    {         DecimalFormat df = new DecimalFormat(##.00);        Scanner input=new Scanner(System.in);        int selection;        OopApproach iPhone = new OopApproach( iPhone 6s, 299);        OopApproach samsung = new OopApproach( Samsung s6, 199);        OopApproach lg = new OopApproach( LG, 99 );        System.out.println(Press 1: + iPhone.model+ =  + $ + df.format(iPhone.price));        System.out.println(Press 2: + samsung.model+ =  + $ +df.format(samsung.price));        System.out.println(Press 3: + cherry.model+ = + $ + df.format(lg.price));        selection=input.nextInt();        switch(selection)        {        case 1:System.out.println( Your item is  + iPhone.model +  with price of  + $ + df.format(iPhone.price));        System.out.println();        calcPrice(iPhone.model, iPhone.price);         break;        case 2:System.out.println( Your item is  + samsung.model +  with price of  + $ + df.format(samsung.price));        System.out.println();        calcPrice(samsung.model, samsung.price);        break;        case 3:System.out.println( Your item is  + lg.model +  with price of  + $ + df.format(lg.price));        System.out.println();        calcPrice(cherry.model, lg.price);        break;        }    }        public static void calcPrice(String model,double price)        {            Scanner in=new Scanner(System.in);            DecimalFormat dff=new DecimalFormat(##.00);            int selec;            double totalVal;            System.out.println(Choose payment option);            System.out.println(1:Cash - 5% discount);            System.out.println(2:Installment, 3 months - 5% interest);            System.out.println(3:Installment, 6 months - 10% interest);            selec=in.nextInt();            if(selec==1)            {                totalVal=price-(price*.05);                System.out.print(You purchased  + model +  and the total cost is + $ + dff.format(totalVal));            }            else if(selec==2)            {                totalVal=price+(price*.05);                System.out.print(You purchased  + model +  and the total cost is + $ + dff.format(totalVal));            }            else if(selec==3)            {                totalVal=price+(price*.10);                System.out.print(You purchased  + model +  and the total cost is + $ + dff.format(totalVal));            }    }}Output:Press 1:iPhone 6s = $299.00Press 2:Samsung s6 = $199.00Press 3:LG = $99.001Your item is iPhone 6s with price of $299.00Choose payment option1:Cash - 5% discount2:Installment, 3 months - 5% interest3:Installment, 6 months - 10% interest1 You purchased iPhone 6s and the total cost is $284.05
Calculating a payment price based on a selected phone
java;beginner;object oriented