antiblock
Elveron
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Sign in to follow this  
armslayeR_-

5€ a quem me resolver isto.

1 post in this topic

Exemplo:

 

    private String nomeprodutoPC;
    private float precoProdutoPC;
    private int quantidadeProdutoPC;
    private float pesoPC;
    private static boolean produtoAtivoPC;

    public static void setProdutoAtivoPC(boolean produtoAtivoPC) {
        ExercicioProdutoPedro.produtoAtivoPC = produtoAtivoPC;
    }

    public ExercicioProdutoPedro(String nomeprodutoPC, float precoProdutoPC, int quantidadeProdutoPC, float pesoPC) {
        this.nomeprodutoPC = nomeprodutoPC;
        this.precoProdutoPC = precoProdutoPC;
        this.quantidadeProdutoPC = quantidadeProdutoPC;
        this.pesoPC = pesoPC;
    }

    public String getNomeprodutoPC() {
        return nomeprodutoPC;
    }

    public void setNomeprodutoPC(String nomeprodutoPC) {
        this.nomeprodutoPC = nomeprodutoPC;
    }

    public float getPrecoProdutoPC() {
        return precoProdutoPC;
    }

    public void setPrecoProdutoPC(float precoProdutoPC) {
        this.precoProdutoPC = precoProdutoPC;
    }

    public int getQuantidadeProdutoPC() {
        return quantidadeProdutoPC;
    }

    public void setQuantidadeProdutoPC(int quantidadeProdutoPC) {
        this.quantidadeProdutoPC = quantidadeProdutoPC;
    }

    public float getPesoPC() {
        return pesoPC;
    }

    public void setPesoPC(float pesoPC) {
        this.pesoPC = pesoPC;
    }
   
float precoPCIva (float precoPC) {
    precoPC = (float) (getPrecoProdutoPC()*1.23;
}
   
}
 

 

 

desafio-java.png

Share this post


Link to post
Share on other sites
antiblock
https://arwen2.global/

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this