Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* criar classe Cigarros e colar abaixo do packpage */
- /**
- *
- * @author Professor Hercio Neto
- */
- public class Cigarros {
- private Integer quantidade;
- private Integer anos;
- private Double tempo = 10d;
- private Double diasPerdidos;
- public Integer getQuantidade() {
- return quantidade;
- }
- public void setQuantidade(Integer quantidade) {
- this.quantidade = quantidade;
- }
- public Integer getAnos() {
- return anos;
- }
- public void setAnos(Integer anos) {
- this.anos = anos;
- }
- public Double getDiasPerdidos() {
- return diasPerdidos;
- }
- public void setdiasPerdidos() {
- Integer cigarrosAnos = this.getQuantidade()*(this.getAnos()*365);
- this.diasPerdidos = (cigarrosAnos/this.tempo)/24;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement