SlideShare a Scribd company logo
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
File Input & Output 1
Q3M1
Dudy Fathan Ali, S.Kom (DFA)
2015
CEP - CCIT
Fakultas Teknik Universitas Indonesia
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
o The stream is a sequence of bytes travelling from a source to a
destination over a communication path.
o The two basic streams used are the input and output streams.
o Input stream is used for a read operation.
o Output stream is used for performing a write operation.
o The System.IO namespace includes various classes, which are
used to perform operations, such as file creation, file deletion,
and the read-write operations to files.
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Common Class of System.IO Namespace
The following table describes some commonly used classes in the System.IO namespace.
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
FileStream Class
Most file Input/Output (I/O) support in the .NET Framework is implemented in
the System.IO namespace. You can use the FileStream class in the
System.IO namespace to read from, to write, and to close files.
FileStream [ObjName] = new FileStream([FileName],
[FileMode], [FileAccess])
Code Structure:
FileStream fs = new FileStream(โ€œMyFile.txtโ€,
FileMode.Open, FileAccess.Read);
Example:
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
StreamReader and StreamWriter Class
The Stream class is used to read from and to write data in the text files. If data
of a file is only text, then you can use the StreamReader class and the
StreamWriter class to accomplish the reading and writing tasks
StreamReader sr = new StreamReader([ObjFileStream])
Code Structure:
FileStream fs = new FileStream(โ€œMyFile.txtโ€,
FileMode.Open, FileAccess.Read);
StreamReader sr = new StreamReader(fs);
Example:
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Process of input data with FileStream and StreamWriter
File
Input.txt
FileStream StreamWriter
Write Data to
Stream
Mengosongkan
memori
Pembacaan data bisa
dari input user atau
dari cara yang lain
Data di simpan ke
dalam file Input.txt
Buka
StreamWriter
Buka
FileStream
Read Data
From User
Close SW &
FS
Tutup
StreamWriter dan
FileStream
Flush
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Process of input data with FileStream and StreamWriter
Consider the following code:
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Latihan Mandiri
Diketahui nama dosen sebagai berikut :
Masukkan lah nama-nama tersebut kedalam satu file dengan nama datadosen.txt
dengan menggunakan FileStream.
Catatan:
Nama dosen harus dimasukkan berdasarkan inputan user (bukan nilai statis dari
variable)
Dudy Fathan Ali S.Kom
Fachran Nazarullah S.Kom
Tri Agus Riyadi S.Kom
Riza Muhammad Nurman S.Kom
Musawarman S.Kom
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Process of reading data with FileStream and StreamReader
File
Output.txt
FileStream
Tampilkan
Data
Next Data
Y
N
Close SR
Close FS
Tutup
StreamReader
Tutup
FileStream
(b) Buka
StreamReader
(a) Buka
FileStream
(a) ๏ƒ  Membuka File
(b) ๏ƒ  Memuat Isi File ke dalam object
sr !=
null
StreamReader
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Process of reading data with FileStream and StreamWriter
Consider the following code:
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Process of search data with FileStream and StreamReader
File
Output.txt
FileStream StreamReader
sr !=
null
Y
N
Close SR
Close FS
Tutup
StreamReader
Tutup
FileStream
Buka StreamReader
Buka
FileReader
Data Search
Data yang di
cari
Variabel dataUntuk menampung
hasil pencarian data
Hasil cari
simpan ke
variabel data
Y
a
Cetak data
Apakah text yang di cari ada,
Jika iya maka akan di simpan
ke variabel data
Untuk pengecekan, anda bisa
menggunakan Contains
aNext Data
Y
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Process of search data with FileStream and StreamWriter
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Latihan Mandiri
Anda ditugaskan untuk mencari nama lengkap dari orang yang bernama โ€œFachranโ€
dari file datadosen.txt yang berisi data sebagai berikut :
Tampilkan data yang dicari sehingga menghasilkan output sebagai berikut :
Catatan :
Parameter pencarian harus dari inputan user (bukan nilai statis dari variable)
Data yang dicari : Fachran Nazarullah S.Kom
Dudy Fathan Ali S.Kom
Fachran Nazarullah S.Kom
Tri Agus Riyadi S.Kom
Riza Muhammad Nurman S.Kom
Musawarman S.Kom
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Delimiter
o Delimiter = Pemisah
o Simbol bisa digunakan untuk delimiter (#, $, &, ~)
o Implementasinya menggunakan array
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Delimiter
o Penggunaan Delimiter :
o Contoh input data pelanggan:
o ID Pelanggan : 8934
o Nama Pelanggan : Joni Simanjuntak
o Jenis Kelamin : Pria
o Alamat : Jakarta
8934#Joni Simanjuntak#Pria#Jakarta
8934;Joni Simanjuntak;Pria;Jakarta
Memiliki delimiter
dengan simbol โ€˜#โ€™
Memiliki delimiter
dengan simbol โ€˜;โ€™
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Mengapa harus menggunakan delimiter?
Berikut data pelanggan
---------------------------------
ID Pelanggan : 8934
Nama Pelanggan : Joni Simanjuntak
Jenis Kelamin : Pria
Alamat : Jakarta
Terkadang developer membutuhkan tampilan seperti ini:
Dengan menggunakan
delimiter, developer dapat
lebih mudah memecah data
yang satu dengan yang lain.
8934#Joni Simanjuntak#Pria#Jakarta
array[0] = 8394 array[1] = Joni
Simanjuntak
array[2] = Pria array[3] =
Jakarta
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Process of input data with delimiter format.
Consider the following code:
File Input & Output
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Process of reading data with delimiter format.
Consider the following code:
Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom
Thank You!
Dudy Fathan Ali S.Kom
dudy.fathan@eng.ui.ac.id
Ad

More Related Content

What's hot (20)

Pushdown Automata - Materi 8 - TBO
Pushdown Automata - Materi 8 - TBOPushdown Automata - Materi 8 - TBO
Pushdown Automata - Materi 8 - TBO
ahmad haidaroh
ย 
Sistem File
Sistem FileSistem File
Sistem File
eddie Ismantoe
ย 
Development & quality plan
Development & quality planDevelopment & quality plan
Development & quality plan
Febryci Legirian
ย 
Pcd 04 - jenis dan format citra
Pcd   04 - jenis dan format citraPcd   04 - jenis dan format citra
Pcd 04 - jenis dan format citra
Febriyani Syafri
ย 
Analisis sistem-informasi
Analisis sistem-informasiAnalisis sistem-informasi
Analisis sistem-informasi
ryanprasetya
ย 
Sistem berkas-ajar-3
Sistem berkas-ajar-3Sistem berkas-ajar-3
Sistem berkas-ajar-3
suin01
ย 
1-Pengantar-Basis-Data-Lanjut-ver-0.ppt
1-Pengantar-Basis-Data-Lanjut-ver-0.ppt1-Pengantar-Basis-Data-Lanjut-ver-0.ppt
1-Pengantar-Basis-Data-Lanjut-ver-0.ppt
AdnanAdam8
ย 
Case-Based Reasoning untuk Pemilihan Kegiatan Organisasi Mahasiswa
Case-Based Reasoning untuk Pemilihan Kegiatan Organisasi MahasiswaCase-Based Reasoning untuk Pemilihan Kegiatan Organisasi Mahasiswa
Case-Based Reasoning untuk Pemilihan Kegiatan Organisasi Mahasiswa
Arif Rohmadi
ย 
Modul PBO Bab-07 - Enkapsulasi (Encapsulation)
Modul PBO Bab-07 - Enkapsulasi (Encapsulation)Modul PBO Bab-07 - Enkapsulasi (Encapsulation)
Modul PBO Bab-07 - Enkapsulasi (Encapsulation)
Rakhmat Dedi Gunawan
ย 
05c neural network-mlp
05c neural network-mlp05c neural network-mlp
05c neural network-mlp
rrahmad_14
ย 
12. keuntungan pemograman dengan menggunakan polymorphism
12. keuntungan pemograman dengan menggunakan polymorphism12. keuntungan pemograman dengan menggunakan polymorphism
12. keuntungan pemograman dengan menggunakan polymorphism
Saprudin Eskom
ย 
5. Doubly Linked List (Struktur Data)
5. Doubly Linked List (Struktur Data)5. Doubly Linked List (Struktur Data)
5. Doubly Linked List (Struktur Data)
Kelinci Coklat
ย 
Contoh judul skripsi
Contoh judul skripsiContoh judul skripsi
Contoh judul skripsi
VampiErt
ย 
Manajemen memory (10) fix
Manajemen memory (10) fixManajemen memory (10) fix
Manajemen memory (10) fix
dikkieretyan
ย 
Modul bahan-ajar-kecerdasan-buatan-ptiik-final
Modul bahan-ajar-kecerdasan-buatan-ptiik-finalModul bahan-ajar-kecerdasan-buatan-ptiik-final
Modul bahan-ajar-kecerdasan-buatan-ptiik-final
Ramla Lamantha
ย 
Materi 7 Context Free Grammar
Materi 7   Context Free Grammar Materi 7   Context Free Grammar
Materi 7 Context Free Grammar
ahmad haidaroh
ย 
Tabel ascii terlengkap
Tabel ascii terlengkapTabel ascii terlengkap
Tabel ascii terlengkap
Lela Warni
ย 
Ekuivalensi logis online class
Ekuivalensi logis online classEkuivalensi logis online class
Ekuivalensi logis online class
Bayu Aji
ย 
Aplikasi pengaduan masyarakat
Aplikasi pengaduan masyarakatAplikasi pengaduan masyarakat
Aplikasi pengaduan masyarakat
HendraRamadani
ย 
[PBO] Pertemuan 6 - Abstrak
[PBO] Pertemuan 6 - Abstrak[PBO] Pertemuan 6 - Abstrak
[PBO] Pertemuan 6 - Abstrak
rizki adam kurniawan
ย 
Pushdown Automata - Materi 8 - TBO
Pushdown Automata - Materi 8 - TBOPushdown Automata - Materi 8 - TBO
Pushdown Automata - Materi 8 - TBO
ahmad haidaroh
ย 
Development & quality plan
Development & quality planDevelopment & quality plan
Development & quality plan
Febryci Legirian
ย 
Pcd 04 - jenis dan format citra
Pcd   04 - jenis dan format citraPcd   04 - jenis dan format citra
Pcd 04 - jenis dan format citra
Febriyani Syafri
ย 
Analisis sistem-informasi
Analisis sistem-informasiAnalisis sistem-informasi
Analisis sistem-informasi
ryanprasetya
ย 
Sistem berkas-ajar-3
Sistem berkas-ajar-3Sistem berkas-ajar-3
Sistem berkas-ajar-3
suin01
ย 
1-Pengantar-Basis-Data-Lanjut-ver-0.ppt
1-Pengantar-Basis-Data-Lanjut-ver-0.ppt1-Pengantar-Basis-Data-Lanjut-ver-0.ppt
1-Pengantar-Basis-Data-Lanjut-ver-0.ppt
AdnanAdam8
ย 
Case-Based Reasoning untuk Pemilihan Kegiatan Organisasi Mahasiswa
Case-Based Reasoning untuk Pemilihan Kegiatan Organisasi MahasiswaCase-Based Reasoning untuk Pemilihan Kegiatan Organisasi Mahasiswa
Case-Based Reasoning untuk Pemilihan Kegiatan Organisasi Mahasiswa
Arif Rohmadi
ย 
Modul PBO Bab-07 - Enkapsulasi (Encapsulation)
Modul PBO Bab-07 - Enkapsulasi (Encapsulation)Modul PBO Bab-07 - Enkapsulasi (Encapsulation)
Modul PBO Bab-07 - Enkapsulasi (Encapsulation)
Rakhmat Dedi Gunawan
ย 
05c neural network-mlp
05c neural network-mlp05c neural network-mlp
05c neural network-mlp
rrahmad_14
ย 
12. keuntungan pemograman dengan menggunakan polymorphism
12. keuntungan pemograman dengan menggunakan polymorphism12. keuntungan pemograman dengan menggunakan polymorphism
12. keuntungan pemograman dengan menggunakan polymorphism
Saprudin Eskom
ย 
5. Doubly Linked List (Struktur Data)
5. Doubly Linked List (Struktur Data)5. Doubly Linked List (Struktur Data)
5. Doubly Linked List (Struktur Data)
Kelinci Coklat
ย 
Contoh judul skripsi
Contoh judul skripsiContoh judul skripsi
Contoh judul skripsi
VampiErt
ย 
Manajemen memory (10) fix
Manajemen memory (10) fixManajemen memory (10) fix
Manajemen memory (10) fix
dikkieretyan
ย 
Modul bahan-ajar-kecerdasan-buatan-ptiik-final
Modul bahan-ajar-kecerdasan-buatan-ptiik-finalModul bahan-ajar-kecerdasan-buatan-ptiik-final
Modul bahan-ajar-kecerdasan-buatan-ptiik-final
Ramla Lamantha
ย 
Materi 7 Context Free Grammar
Materi 7   Context Free Grammar Materi 7   Context Free Grammar
Materi 7 Context Free Grammar
ahmad haidaroh
ย 
Tabel ascii terlengkap
Tabel ascii terlengkapTabel ascii terlengkap
Tabel ascii terlengkap
Lela Warni
ย 
Ekuivalensi logis online class
Ekuivalensi logis online classEkuivalensi logis online class
Ekuivalensi logis online class
Bayu Aji
ย 
Aplikasi pengaduan masyarakat
Aplikasi pengaduan masyarakatAplikasi pengaduan masyarakat
Aplikasi pengaduan masyarakat
HendraRamadani
ย 
[PBO] Pertemuan 6 - Abstrak
[PBO] Pertemuan 6 - Abstrak[PBO] Pertemuan 6 - Abstrak
[PBO] Pertemuan 6 - Abstrak
rizki adam kurniawan
ย 

Viewers also liked (19)

Object Oriented Programming - Inheritance
Object Oriented Programming - InheritanceObject Oriented Programming - Inheritance
Object Oriented Programming - Inheritance
Dudy Ali
ย 
Object Oriented Programming - Abstraction & Encapsulation
Object Oriented Programming - Abstraction & EncapsulationObject Oriented Programming - Abstraction & Encapsulation
Object Oriented Programming - Abstraction & Encapsulation
Dudy Ali
ย 
Java CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server DatabaseJava CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server Database
Dudy Ali
ย 
Object Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference TypesObject Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference Types
Dudy Ali
ย 
Object Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & DestructorsObject Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & Destructors
Dudy Ali
ย 
Database Introduction - Akses Data dengan SQL Server
Database Introduction - Akses Data dengan SQL ServerDatabase Introduction - Akses Data dengan SQL Server
Database Introduction - Akses Data dengan SQL Server
Dudy Ali
ย 
Network Socket Programming with JAVA
Network Socket Programming with JAVANetwork Socket Programming with JAVA
Network Socket Programming with JAVA
Dudy Ali
ย 
Information System Security - Akuntabilitas dan Akses Kontrol
Information System Security - Akuntabilitas dan Akses KontrolInformation System Security - Akuntabilitas dan Akses Kontrol
Information System Security - Akuntabilitas dan Akses Kontrol
Dudy Ali
ย 
Information System Security - Teknik Akses Kontrol
Information System Security - Teknik Akses KontrolInformation System Security - Teknik Akses Kontrol
Information System Security - Teknik Akses Kontrol
Dudy Ali
ย 
Information System Security - Komponen Intranet dan Ekstranet
Information System Security - Komponen Intranet dan EkstranetInformation System Security - Komponen Intranet dan Ekstranet
Information System Security - Komponen Intranet dan Ekstranet
Dudy Ali
ย 
Information System Security - Prinsip Manajemen Keamanan
Information System Security - Prinsip Manajemen KeamananInformation System Security - Prinsip Manajemen Keamanan
Information System Security - Prinsip Manajemen Keamanan
Dudy Ali
ย 
Information System Security - Konsep Manajemen Keamanan
Information System Security - Konsep Manajemen KeamananInformation System Security - Konsep Manajemen Keamanan
Information System Security - Konsep Manajemen Keamanan
Dudy Ali
ย 
Diagram Konteks dan DFD Sistem Informasi Penjualan
Diagram Konteks dan DFD Sistem Informasi PenjualanDiagram Konteks dan DFD Sistem Informasi Penjualan
Diagram Konteks dan DFD Sistem Informasi Penjualan
Ricky Kusriana Subagja
ย 
MIS BAB 10
MIS BAB 10MIS BAB 10
MIS BAB 10
Riza Nurman
ย 
Information System Security - Konsep dan Kebijakan Keamanan
Information System Security - Konsep dan Kebijakan KeamananInformation System Security - Konsep dan Kebijakan Keamanan
Information System Security - Konsep dan Kebijakan Keamanan
Dudy Ali
ย 
Information System Security - Serangan dan Pengawasan
Information System Security - Serangan dan PengawasanInformation System Security - Serangan dan Pengawasan
Information System Security - Serangan dan Pengawasan
Dudy Ali
ย 
Perancangan (diagram softekz, dfd level 0,1,2)
Perancangan (diagram softekz, dfd level 0,1,2)Perancangan (diagram softekz, dfd level 0,1,2)
Perancangan (diagram softekz, dfd level 0,1,2)
Joel Marobo
ย 
Information System Security - Kriptografi
Information System Security - KriptografiInformation System Security - Kriptografi
Information System Security - Kriptografi
Dudy Ali
ย 
Information System Security - Keamanan Komunikasi dan Jaringan
Information System Security - Keamanan Komunikasi dan JaringanInformation System Security - Keamanan Komunikasi dan Jaringan
Information System Security - Keamanan Komunikasi dan Jaringan
Dudy Ali
ย 
Object Oriented Programming - Inheritance
Object Oriented Programming - InheritanceObject Oriented Programming - Inheritance
Object Oriented Programming - Inheritance
Dudy Ali
ย 
Object Oriented Programming - Abstraction & Encapsulation
Object Oriented Programming - Abstraction & EncapsulationObject Oriented Programming - Abstraction & Encapsulation
Object Oriented Programming - Abstraction & Encapsulation
Dudy Ali
ย 
Java CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server DatabaseJava CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server Database
Dudy Ali
ย 
Object Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference TypesObject Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference Types
Dudy Ali
ย 
Object Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & DestructorsObject Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & Destructors
Dudy Ali
ย 
Database Introduction - Akses Data dengan SQL Server
Database Introduction - Akses Data dengan SQL ServerDatabase Introduction - Akses Data dengan SQL Server
Database Introduction - Akses Data dengan SQL Server
Dudy Ali
ย 
Network Socket Programming with JAVA
Network Socket Programming with JAVANetwork Socket Programming with JAVA
Network Socket Programming with JAVA
Dudy Ali
ย 
Information System Security - Akuntabilitas dan Akses Kontrol
Information System Security - Akuntabilitas dan Akses KontrolInformation System Security - Akuntabilitas dan Akses Kontrol
Information System Security - Akuntabilitas dan Akses Kontrol
Dudy Ali
ย 
Information System Security - Teknik Akses Kontrol
Information System Security - Teknik Akses KontrolInformation System Security - Teknik Akses Kontrol
Information System Security - Teknik Akses Kontrol
Dudy Ali
ย 
Information System Security - Komponen Intranet dan Ekstranet
Information System Security - Komponen Intranet dan EkstranetInformation System Security - Komponen Intranet dan Ekstranet
Information System Security - Komponen Intranet dan Ekstranet
Dudy Ali
ย 
Information System Security - Prinsip Manajemen Keamanan
Information System Security - Prinsip Manajemen KeamananInformation System Security - Prinsip Manajemen Keamanan
Information System Security - Prinsip Manajemen Keamanan
Dudy Ali
ย 
Information System Security - Konsep Manajemen Keamanan
Information System Security - Konsep Manajemen KeamananInformation System Security - Konsep Manajemen Keamanan
Information System Security - Konsep Manajemen Keamanan
Dudy Ali
ย 
Diagram Konteks dan DFD Sistem Informasi Penjualan
Diagram Konteks dan DFD Sistem Informasi PenjualanDiagram Konteks dan DFD Sistem Informasi Penjualan
Diagram Konteks dan DFD Sistem Informasi Penjualan
Ricky Kusriana Subagja
ย 
MIS BAB 10
MIS BAB 10MIS BAB 10
MIS BAB 10
Riza Nurman
ย 
Information System Security - Konsep dan Kebijakan Keamanan
Information System Security - Konsep dan Kebijakan KeamananInformation System Security - Konsep dan Kebijakan Keamanan
Information System Security - Konsep dan Kebijakan Keamanan
Dudy Ali
ย 
Information System Security - Serangan dan Pengawasan
Information System Security - Serangan dan PengawasanInformation System Security - Serangan dan Pengawasan
Information System Security - Serangan dan Pengawasan
Dudy Ali
ย 
Perancangan (diagram softekz, dfd level 0,1,2)
Perancangan (diagram softekz, dfd level 0,1,2)Perancangan (diagram softekz, dfd level 0,1,2)
Perancangan (diagram softekz, dfd level 0,1,2)
Joel Marobo
ย 
Information System Security - Kriptografi
Information System Security - KriptografiInformation System Security - Kriptografi
Information System Security - Kriptografi
Dudy Ali
ย 
Information System Security - Keamanan Komunikasi dan Jaringan
Information System Security - Keamanan Komunikasi dan JaringanInformation System Security - Keamanan Komunikasi dan Jaringan
Information System Security - Keamanan Komunikasi dan Jaringan
Dudy Ali
ย 
Ad

Similar to Object Oriented Programming - File Input & Output (20)

Cs 1114 - lecture-29
Cs 1114 - lecture-29Cs 1114 - lecture-29
Cs 1114 - lecture-29
Zeeshan Sabir
ย 
Stream classes in C++
Stream classes in C++Stream classes in C++
Stream classes in C++
Shyam Gupta
ย 
Unit 5
Unit 5Unit 5
Unit 5
S.S.B.Tโ€™s. College of Engineering & Technology
ย 
file handling final3333.pptx
file handling final3333.pptxfile handling final3333.pptx
file handling final3333.pptx
radhushri
ย 
Savitch ch 06
Savitch ch 06Savitch ch 06
Savitch ch 06
Terry Yoast
ย 
Aae oop xp_12
Aae oop xp_12Aae oop xp_12
Aae oop xp_12
Niit Care
ย 
Student Lab Activity CIS170 Week 6 Lab Instructions.docx
Student Lab Activity CIS170 Week 6 Lab Instructions.docxStudent Lab Activity CIS170 Week 6 Lab Instructions.docx
Student Lab Activity CIS170 Week 6 Lab Instructions.docx
florriezhamphrey3065
ย 
Csc1100 lecture15 ch09
Csc1100 lecture15 ch09Csc1100 lecture15 ch09
Csc1100 lecture15 ch09
IIUM
ย 
Introduction to files management systems
Introduction to files management systemsIntroduction to files management systems
Introduction to files management systems
araba8
ย 
Object Oriented Programming using C++: Ch12 Streams and Files.pptx
Object Oriented Programming using C++: Ch12 Streams and Files.pptxObject Oriented Programming using C++: Ch12 Streams and Files.pptx
Object Oriented Programming using C++: Ch12 Streams and Files.pptx
RashidFaridChishti
ย 
Object Oriented Programming Using C++: Ch12 Streams and Files.pptx
Object Oriented Programming Using C++: Ch12 Streams and Files.pptxObject Oriented Programming Using C++: Ch12 Streams and Files.pptx
Object Oriented Programming Using C++: Ch12 Streams and Files.pptx
RashidFaridChishti
ย 
chapter-12-data-file-handling.pdf
chapter-12-data-file-handling.pdfchapter-12-data-file-handling.pdf
chapter-12-data-file-handling.pdf
study material
ย 
File in cpp 2016
File in cpp 2016 File in cpp 2016
File in cpp 2016
Dr .Ahmed Tawwab
ย 
Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)
Abdullah khawar
ย 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
Kavitha713564
ย 
Savitch Ch 06
Savitch Ch 06Savitch Ch 06
Savitch Ch 06
Terry Yoast
ย 
Savitch Ch 06
Savitch Ch 06Savitch Ch 06
Savitch Ch 06
Terry Yoast
ย 
Chpater29 operation-on-file
Chpater29 operation-on-fileChpater29 operation-on-file
Chpater29 operation-on-file
Deepak Singh
ย 
VIT351 Software Development VI Unit5
VIT351 Software Development VI Unit5VIT351 Software Development VI Unit5
VIT351 Software Development VI Unit5
YOGESH SINGH
ย 
Data file handling
Data file handlingData file handling
Data file handling
Prof. Dr. K. Adisesha
ย 
Cs 1114 - lecture-29
Cs 1114 - lecture-29Cs 1114 - lecture-29
Cs 1114 - lecture-29
Zeeshan Sabir
ย 
Stream classes in C++
Stream classes in C++Stream classes in C++
Stream classes in C++
Shyam Gupta
ย 
file handling final3333.pptx
file handling final3333.pptxfile handling final3333.pptx
file handling final3333.pptx
radhushri
ย 
Savitch ch 06
Savitch ch 06Savitch ch 06
Savitch ch 06
Terry Yoast
ย 
Aae oop xp_12
Aae oop xp_12Aae oop xp_12
Aae oop xp_12
Niit Care
ย 
Student Lab Activity CIS170 Week 6 Lab Instructions.docx
Student Lab Activity CIS170 Week 6 Lab Instructions.docxStudent Lab Activity CIS170 Week 6 Lab Instructions.docx
Student Lab Activity CIS170 Week 6 Lab Instructions.docx
florriezhamphrey3065
ย 
Csc1100 lecture15 ch09
Csc1100 lecture15 ch09Csc1100 lecture15 ch09
Csc1100 lecture15 ch09
IIUM
ย 
Introduction to files management systems
Introduction to files management systemsIntroduction to files management systems
Introduction to files management systems
araba8
ย 
Object Oriented Programming using C++: Ch12 Streams and Files.pptx
Object Oriented Programming using C++: Ch12 Streams and Files.pptxObject Oriented Programming using C++: Ch12 Streams and Files.pptx
Object Oriented Programming using C++: Ch12 Streams and Files.pptx
RashidFaridChishti
ย 
Object Oriented Programming Using C++: Ch12 Streams and Files.pptx
Object Oriented Programming Using C++: Ch12 Streams and Files.pptxObject Oriented Programming Using C++: Ch12 Streams and Files.pptx
Object Oriented Programming Using C++: Ch12 Streams and Files.pptx
RashidFaridChishti
ย 
chapter-12-data-file-handling.pdf
chapter-12-data-file-handling.pdfchapter-12-data-file-handling.pdf
chapter-12-data-file-handling.pdf
study material
ย 
File in cpp 2016
File in cpp 2016 File in cpp 2016
File in cpp 2016
Dr .Ahmed Tawwab
ย 
Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)Pf cs102 programming-8 [file handling] (1)
Pf cs102 programming-8 [file handling] (1)
Abdullah khawar
ย 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
Kavitha713564
ย 
Savitch Ch 06
Savitch Ch 06Savitch Ch 06
Savitch Ch 06
Terry Yoast
ย 
Savitch Ch 06
Savitch Ch 06Savitch Ch 06
Savitch Ch 06
Terry Yoast
ย 
Chpater29 operation-on-file
Chpater29 operation-on-fileChpater29 operation-on-file
Chpater29 operation-on-file
Deepak Singh
ย 
VIT351 Software Development VI Unit5
VIT351 Software Development VI Unit5VIT351 Software Development VI Unit5
VIT351 Software Development VI Unit5
YOGESH SINGH
ย 
Ad

More from Dudy Ali (20)

Understanding COM+
Understanding COM+Understanding COM+
Understanding COM+
Dudy Ali
ย 
Distributed Application Development (Introduction)
Distributed Application Development (Introduction)Distributed Application Development (Introduction)
Distributed Application Development (Introduction)
Dudy Ali
ย 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NET
Dudy Ali
ย 
XML Schema Part 2
XML Schema Part 2XML Schema Part 2
XML Schema Part 2
Dudy Ali
ย 
XML Schema Part 1
XML Schema Part 1XML Schema Part 1
XML Schema Part 1
Dudy Ali
ย 
Rendering XML Document
Rendering XML DocumentRendering XML Document
Rendering XML Document
Dudy Ali
ย 
Pengantar XML
Pengantar XMLPengantar XML
Pengantar XML
Dudy Ali
ย 
Pengantar XML DOM
Pengantar XML DOMPengantar XML DOM
Pengantar XML DOM
Dudy Ali
ย 
Pengantar ADO.NET
Pengantar ADO.NETPengantar ADO.NET
Pengantar ADO.NET
Dudy Ali
ย 
Database Connectivity with JDBC
Database Connectivity with JDBCDatabase Connectivity with JDBC
Database Connectivity with JDBC
Dudy Ali
ย 
XML - Displaying Data ith XSLT
XML - Displaying Data ith XSLTXML - Displaying Data ith XSLT
XML - Displaying Data ith XSLT
Dudy Ali
ย 
Algorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Algoritma PengurutanAlgorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Algoritma Pengurutan
Dudy Ali
ย 
Algorithm & Data Structure - Pengantar
Algorithm & Data Structure - PengantarAlgorithm & Data Structure - Pengantar
Algorithm & Data Structure - Pengantar
Dudy Ali
ย 
Web Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - Pengenalan Halaman WebWeb Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - Pengenalan Halaman Web
Dudy Ali
ย 
Web Programming Syaria - PHP
Web Programming Syaria - PHPWeb Programming Syaria - PHP
Web Programming Syaria - PHP
Dudy Ali
ย 
Software Project Management - Project Management Knowledge
Software Project Management - Project Management KnowledgeSoftware Project Management - Project Management Knowledge
Software Project Management - Project Management Knowledge
Dudy Ali
ย 
Software Project Management - Proses Manajemen Proyek
Software Project Management - Proses Manajemen ProyekSoftware Project Management - Proses Manajemen Proyek
Software Project Management - Proses Manajemen Proyek
Dudy Ali
ย 
Software Project Management - Pengenalan Manajemen Proyek
Software Project Management - Pengenalan Manajemen ProyekSoftware Project Management - Pengenalan Manajemen Proyek
Software Project Management - Pengenalan Manajemen Proyek
Dudy Ali
ย 
System Analysis and Design - Unified Modeling Language (UML)
System Analysis and Design - Unified Modeling Language (UML)System Analysis and Design - Unified Modeling Language (UML)
System Analysis and Design - Unified Modeling Language (UML)
Dudy Ali
ย 
System Analysis and Design - Tinjauan Umum Pengembangan Sistem
System Analysis and Design - Tinjauan Umum Pengembangan SistemSystem Analysis and Design - Tinjauan Umum Pengembangan Sistem
System Analysis and Design - Tinjauan Umum Pengembangan Sistem
Dudy Ali
ย 
Understanding COM+
Understanding COM+Understanding COM+
Understanding COM+
Dudy Ali
ย 
Distributed Application Development (Introduction)
Distributed Application Development (Introduction)Distributed Application Development (Introduction)
Distributed Application Development (Introduction)
Dudy Ali
ย 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NET
Dudy Ali
ย 
XML Schema Part 2
XML Schema Part 2XML Schema Part 2
XML Schema Part 2
Dudy Ali
ย 
XML Schema Part 1
XML Schema Part 1XML Schema Part 1
XML Schema Part 1
Dudy Ali
ย 
Rendering XML Document
Rendering XML DocumentRendering XML Document
Rendering XML Document
Dudy Ali
ย 
Pengantar XML
Pengantar XMLPengantar XML
Pengantar XML
Dudy Ali
ย 
Pengantar XML DOM
Pengantar XML DOMPengantar XML DOM
Pengantar XML DOM
Dudy Ali
ย 
Pengantar ADO.NET
Pengantar ADO.NETPengantar ADO.NET
Pengantar ADO.NET
Dudy Ali
ย 
Database Connectivity with JDBC
Database Connectivity with JDBCDatabase Connectivity with JDBC
Database Connectivity with JDBC
Dudy Ali
ย 
XML - Displaying Data ith XSLT
XML - Displaying Data ith XSLTXML - Displaying Data ith XSLT
XML - Displaying Data ith XSLT
Dudy Ali
ย 
Algorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Algoritma PengurutanAlgorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Algoritma Pengurutan
Dudy Ali
ย 
Algorithm & Data Structure - Pengantar
Algorithm & Data Structure - PengantarAlgorithm & Data Structure - Pengantar
Algorithm & Data Structure - Pengantar
Dudy Ali
ย 
Web Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - Pengenalan Halaman WebWeb Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - Pengenalan Halaman Web
Dudy Ali
ย 
Web Programming Syaria - PHP
Web Programming Syaria - PHPWeb Programming Syaria - PHP
Web Programming Syaria - PHP
Dudy Ali
ย 
Software Project Management - Project Management Knowledge
Software Project Management - Project Management KnowledgeSoftware Project Management - Project Management Knowledge
Software Project Management - Project Management Knowledge
Dudy Ali
ย 
Software Project Management - Proses Manajemen Proyek
Software Project Management - Proses Manajemen ProyekSoftware Project Management - Proses Manajemen Proyek
Software Project Management - Proses Manajemen Proyek
Dudy Ali
ย 
Software Project Management - Pengenalan Manajemen Proyek
Software Project Management - Pengenalan Manajemen ProyekSoftware Project Management - Pengenalan Manajemen Proyek
Software Project Management - Pengenalan Manajemen Proyek
Dudy Ali
ย 
System Analysis and Design - Unified Modeling Language (UML)
System Analysis and Design - Unified Modeling Language (UML)System Analysis and Design - Unified Modeling Language (UML)
System Analysis and Design - Unified Modeling Language (UML)
Dudy Ali
ย 
System Analysis and Design - Tinjauan Umum Pengembangan Sistem
System Analysis and Design - Tinjauan Umum Pengembangan SistemSystem Analysis and Design - Tinjauan Umum Pengembangan Sistem
System Analysis and Design - Tinjauan Umum Pengembangan Sistem
Dudy Ali
ย 

Recently uploaded (20)

ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
ย 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
ย 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
ย 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
ย 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
ย 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
ย 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
ย 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
ย 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
ย 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
ย 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
ย 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
ย 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
ย 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
ย 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
ย 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
ย 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
ย 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
ย 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
ย 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
ย 

Object Oriented Programming - File Input & Output

  • 1. Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom File Input & Output 1 Q3M1 Dudy Fathan Ali, S.Kom (DFA) 2015 CEP - CCIT Fakultas Teknik Universitas Indonesia
  • 2. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom o The stream is a sequence of bytes travelling from a source to a destination over a communication path. o The two basic streams used are the input and output streams. o Input stream is used for a read operation. o Output stream is used for performing a write operation. o The System.IO namespace includes various classes, which are used to perform operations, such as file creation, file deletion, and the read-write operations to files.
  • 3. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Common Class of System.IO Namespace The following table describes some commonly used classes in the System.IO namespace.
  • 4. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom FileStream Class Most file Input/Output (I/O) support in the .NET Framework is implemented in the System.IO namespace. You can use the FileStream class in the System.IO namespace to read from, to write, and to close files. FileStream [ObjName] = new FileStream([FileName], [FileMode], [FileAccess]) Code Structure: FileStream fs = new FileStream(โ€œMyFile.txtโ€, FileMode.Open, FileAccess.Read); Example:
  • 5. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom StreamReader and StreamWriter Class The Stream class is used to read from and to write data in the text files. If data of a file is only text, then you can use the StreamReader class and the StreamWriter class to accomplish the reading and writing tasks StreamReader sr = new StreamReader([ObjFileStream]) Code Structure: FileStream fs = new FileStream(โ€œMyFile.txtโ€, FileMode.Open, FileAccess.Read); StreamReader sr = new StreamReader(fs); Example:
  • 6. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Process of input data with FileStream and StreamWriter File Input.txt FileStream StreamWriter Write Data to Stream Mengosongkan memori Pembacaan data bisa dari input user atau dari cara yang lain Data di simpan ke dalam file Input.txt Buka StreamWriter Buka FileStream Read Data From User Close SW & FS Tutup StreamWriter dan FileStream Flush
  • 7. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Process of input data with FileStream and StreamWriter Consider the following code:
  • 8. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Latihan Mandiri Diketahui nama dosen sebagai berikut : Masukkan lah nama-nama tersebut kedalam satu file dengan nama datadosen.txt dengan menggunakan FileStream. Catatan: Nama dosen harus dimasukkan berdasarkan inputan user (bukan nilai statis dari variable) Dudy Fathan Ali S.Kom Fachran Nazarullah S.Kom Tri Agus Riyadi S.Kom Riza Muhammad Nurman S.Kom Musawarman S.Kom
  • 9. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Process of reading data with FileStream and StreamReader File Output.txt FileStream Tampilkan Data Next Data Y N Close SR Close FS Tutup StreamReader Tutup FileStream (b) Buka StreamReader (a) Buka FileStream (a) ๏ƒ  Membuka File (b) ๏ƒ  Memuat Isi File ke dalam object sr != null StreamReader
  • 10. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Process of reading data with FileStream and StreamWriter Consider the following code:
  • 11. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Process of search data with FileStream and StreamReader File Output.txt FileStream StreamReader sr != null Y N Close SR Close FS Tutup StreamReader Tutup FileStream Buka StreamReader Buka FileReader Data Search Data yang di cari Variabel dataUntuk menampung hasil pencarian data Hasil cari simpan ke variabel data Y a Cetak data Apakah text yang di cari ada, Jika iya maka akan di simpan ke variabel data Untuk pengecekan, anda bisa menggunakan Contains aNext Data Y
  • 12. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Process of search data with FileStream and StreamWriter
  • 13. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Latihan Mandiri Anda ditugaskan untuk mencari nama lengkap dari orang yang bernama โ€œFachranโ€ dari file datadosen.txt yang berisi data sebagai berikut : Tampilkan data yang dicari sehingga menghasilkan output sebagai berikut : Catatan : Parameter pencarian harus dari inputan user (bukan nilai statis dari variable) Data yang dicari : Fachran Nazarullah S.Kom Dudy Fathan Ali S.Kom Fachran Nazarullah S.Kom Tri Agus Riyadi S.Kom Riza Muhammad Nurman S.Kom Musawarman S.Kom
  • 14. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Delimiter o Delimiter = Pemisah o Simbol bisa digunakan untuk delimiter (#, $, &, ~) o Implementasinya menggunakan array
  • 15. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Delimiter o Penggunaan Delimiter : o Contoh input data pelanggan: o ID Pelanggan : 8934 o Nama Pelanggan : Joni Simanjuntak o Jenis Kelamin : Pria o Alamat : Jakarta 8934#Joni Simanjuntak#Pria#Jakarta 8934;Joni Simanjuntak;Pria;Jakarta Memiliki delimiter dengan simbol โ€˜#โ€™ Memiliki delimiter dengan simbol โ€˜;โ€™
  • 16. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Mengapa harus menggunakan delimiter? Berikut data pelanggan --------------------------------- ID Pelanggan : 8934 Nama Pelanggan : Joni Simanjuntak Jenis Kelamin : Pria Alamat : Jakarta Terkadang developer membutuhkan tampilan seperti ini: Dengan menggunakan delimiter, developer dapat lebih mudah memecah data yang satu dengan yang lain. 8934#Joni Simanjuntak#Pria#Jakarta array[0] = 8394 array[1] = Joni Simanjuntak array[2] = Pria array[3] = Jakarta
  • 17. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Process of input data with delimiter format. Consider the following code:
  • 18. File Input & Output Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Process of reading data with delimiter format. Consider the following code:
  • 19. Q3M1 โ€“ OOP C# Dudy Fathan Ali S.Kom Thank You! Dudy Fathan Ali S.Kom [email protected]