Quantcast
Channel: Tópicos
Viewing all articles
Browse latest Browse all 11336

Imprimir dados

$
0
0
Obrigado mas se eu meter a tua sugestão da-me 3 erros, Error 2 Only assignment, call, increment, decrement, and new object expressions can be used as a statement C:\Users\joao\Desktop\Psi\ex89\ex89\Program.cs 54 21 ex89,Error 1 The name 'value' does not exist in the current context C:\Users\joao\Desktop\Psi\ex89\ex89\Program.cs 52 21 ex89. . using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class EstudanteInf { string Nome; Double Teste1; Double Teste2; private string p; public EstudanteInf(string NomeDoAluno, Double NotaTeste1, Double NotaTeste2) { Nome = NomeDoAluno; Teste1 = NotaTeste1; Teste2 = NotaTeste2; } public EstudanteInf(string p) { // TODO: Complete member initialization this.p = p; } public Double classFinal() { Double media = (Teste1 + Teste2) / 2; return media; } public string lerNome() { return Nome; } public string lerTeste1() { return Teste1.ToString(); } public string lerTeste2() { return Teste2.ToString(); } public void escreveNome(string NomeDoAluno) { Nome = NomeDoAluno; } public void escrevenotaTeste1(Double notaTeste1) { Teste1 = notaTeste1; } public void escrevenotaTeste2(Double notaTeste2) { Teste2 = notaTeste2; } public string situacaoDoAluno() { double classificacaoFinal = classFinal(); if (classificacaoFinal >= 10) { return "Aprovado"; } else { if (classificacaoFinal >= 8) return "Admitido a oral"; else { return "reprovado"; } } } public void imprimir() { } } }

Viewing all articles
Browse latest Browse all 11336

Trending Articles