NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
class Sinema

{
int koltukSayısi; //field
int bosKoltukSayisi; //field
int bakiye; //field

public int KoltukSayısi
{
get { return koltukSayısi; }

set { koltukSayısi = value; }
}

public int BosKoltukSayisi
{
get { return bosKoltukSayisi; }

set { bosKoltukSayisi = value; }
}

public int Bakiye
{
get { return bakiye; }

set { bakiye = value; }
}

public class BiletSat //sınıf içinde sınıf tanımlama
{
static public void biletSat(int toplambilet)
{
int oAdet = 0, tAdet = 0, secim, s, oToplam = 0,tToplam=0, toplam = 0; toplambilet = 0;
do
{
Console.Write("Öğrenci mi tam bilet mi?nÖğrenci :[1]nTam :[2]nSEÇİM : ");
secim = Convert.ToInt16(Console.ReadLine());
if (secim == 1)
{
Console.Write("Öğrenci kaç adet : ");
oAdet = Convert.ToInt16(Console.ReadLine());
oToplam = oAdet * 15;
}
else if (secim == 2)
{
Console.Write("Tam kaç adet : ");
tAdet = Convert.ToInt16(Console.ReadLine());
tToplam = tAdet * 25;
}
Console.Write("Sırada kişi var mı?nVAR [1]nYOK [2]nSECİM : ");
s = Convert.ToInt16(Console.ReadLine());
if(s==1)
{
Console.Write("Öğrenci mi tam bilet mi?nÖğrenci :[1]nTam :[2]nSEÇİM : ");
secim = Convert.ToInt16(Console.ReadLine());
if (secim == 1)
{
Console.Write("Öğrenci kaç adet : ");
oAdet = Convert.ToInt16(Console.ReadLine());
oToplam = oAdet * 15;
}
else if (secim == 2)
{
Console.Write("Tam kaç adet : ");
tAdet = Convert.ToInt16(Console.ReadLine());
tToplam = tAdet * 25;
}
Console.Write("Öğrenci mi tam bilet mi?nÖğrenci :[1]nTam :[2]nSEÇİM : ");
secim = Convert.ToInt16(Console.ReadLine());
toplambilet = oAdet + tAdet;
toplam = oToplam + tToplam;


Console.WriteLine("Toplam Satılan Bilet: "+toplambilet);
Console.WriteLine("Satılan Biletlerin Fiyatlarının Toplamı: "+toplam);
}
} while (s != 2);

}
}
static public void bosKoltukOgren(int a)
{
int boskoltuk = 0;
// boskoltuk=
// Console.WriteLine("Boş Olan Koltuk Sayısı: ");
}
static public void bakiyeOgren(int b)
{

}
}

class Program
{
/*Sinema sınıfı olacak
* fieldlar: koltukSayısı,bosKoltukSayısı,bakiye(public olamayacak)
* bu sınıfta biletSat sınıfı olacak.
* bilet sat çalıştığında kaç adet bilet satılacağı sorulacak
* giriş yapıldıktan sonra her bilet için öğrenci-tam sorgusu çalışacak
* (öğrenci 15 tam 25)
*
* Boş koltuk sayisi-bakiye
*
* bosKoltukOgren metot olacak
* bakiyeOgren metot olacak
*
* Program çalıştığında ana ekran
* [1] Bilet Sat
* [2] Boş Koltuk
* [3] Bakiye Öğren
* [4] Çıkış
*
* hatalı girişe izin verilmeyecek
* koltuk sayısı program başında rastgele(20,40) belirlenecek
* */
static void Main(string[] args)
{
Random rnd = new Random();
Sinema sn = new Sinema();
Sinema.BiletSat bs = new Sinema.BiletSat();
sn.KoltukSayısi = rnd.Next(20, 40);
Console.WriteLine("Sinema Salonunda {0} tane koltuk mevcuttur..", sn.KoltukSayısi);
string secim = " ", secim1 = " ";
do
{

Console.WriteLine("Yapmak İstediğinizİşlemi Seçiniz:n[1]Bilet Satn[2]Boş Koltuk Sayısını Öğrenn[3]Bakiye Öğrenn[4]Bilet İptaln[5]ÇıkışnSEÇİM:");
secim = Console.ReadLine();
if (secim == "1")
{
Console.WriteLine("Kaç Adet Bilet Satılacak: ");
int a = Convert.ToInt16(Console.ReadLine());
Sinema.BiletSat.biletSat(a);
}
else if (secim == "2")
{

}
else if (secim == "3")
{

}
else if (secim == "4")
{

}
else if (secim == "5")
{
Console.WriteLine("Çıkış Yapılıyor...");
break;
}
Console.WriteLine("Tekrar İşlem Yapmak İstiyor musunuz:[E][H]");
secim1 = Console.ReadLine();
if (secim1 == "E")
{
}

}

while (secim1 != "H");
Console.WriteLine("Çıkış Yapılıyor...");

Console.ReadLine();
}
}
}

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.