Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace RELATORIO_N_ALUNOS_POO
- {
- class Aluno
- {
- //variáveis privadas
- private string nome;
- private double P1, P2;
- //construtor padrão
- public Aluno(string nome, double P1, double P2)
- {
- this.nome = nome;
- this.P1 = P1;
- this.P2 = P2;
- }
- //método IsAprovado
- public bool IsAprovado()
- {
- return getMedia() >= 6;
- }
- public string getNome()
- {
- return nome;
- }
- public double getMedia()
- {
- return (P1 + P2) / 2;
- }
- }
- }
Add Comment
Please, Sign In to add comment