Advertisement
Guest User

ZADANIE 1

a guest
Mar 28th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp5
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Komputer Msi = new Komputer("intel","MSI", "NVIDIA", 17.3);
  14. Komputer Lenovo = new Komputer("amd", "LENOVO", "NVIDIA", 15.6);
  15. Msi.WypiszModel();
  16. Lenovo.WypiszModel();
  17. Console.ReadLine();}}
  18. class Komputer
  19. { // inicjalizacja zmiennych
  20. public string modelProcesora;
  21. public string producent;
  22. public double ekran;
  23. public string karta;
  24. //konstruktor
  25. public Komputer(string mProc, string prod, string kartaa, double ekrann)
  26. { modelProcesora = mProc;
  27. karta = kartaa;
  28. ekran = ekrann;
  29. producent = prod;}
  30. //metody
  31. public void WypiszModel()
  32. {
  33. Console.WriteLine("Nazwa producento to:" + modelProcesora);
  34. Console.WriteLine("Karta graficzna:" + karta);
  35. Console.WriteLine("przekatna ekranu to:" + ekran);
  36. Console.WriteLine("Model procesora to:" + modelProcesora);
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement