Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.InteropServices.ComTypes;
- namespace Atividade5Ex2
- {
- public class Televisao
- {
- string canalnom = "Globo";
- private int canalnum = 3;
- private int volume = 50;
- public int volumep
- {
- get
- {
- return volume;
- }
- set
- {
- if (value < 0)
- {
- volume = 0;
- }
- else if (value > 100)
- {
- volume = 100;
- }
- else
- {
- volume = value;
- }
- }
- }
- public int canalp
- {
- get
- {
- return canalnum;
- }
- set
- {
- if (value < 0)
- {
- canalnum = 0;
- }
- else
- {
- canalnum = value;
- }
- }
- }
- ~Televisao()
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement