C155-112111-Chap10Files - CPT 155 Introduction to...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CPT 155  Introduction to Object-Oriented  Programming Objectives: 1. Persisting Data with Files Assignments 1. Read Chapter 11 2. Lab 10 due tonight CNIT 15500, Fall 2011 © 2011, Alka Harriger  Slide1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object Persistence Random access memory (RAM) Sometimes called volatile memory Loses its contents when electricity is turned off Much faster than non-volatile memory access Non-volatile memory Memory that does not lose its contents when the electricity is turned off Also known as external storage Persistence Storing an object in non-volatile memory CNIT 15500, Fall 2011 © 2011, Alka Harriger  Slide2
Background image of page 2
Files Persisting objects to files is important because It eliminates need to reenter data It allows information to be shared between people, or applications File format Describes how file is organized Determined by software used to create the file File extension Does not dictate what is contained within the file CNIT 15500, Fall 2011 © 2011, Alka Harriger  Slide3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Files To identify a file’s location, you need The drive letter of the disk The folders and subfolders in which the file is contained The filename The file extension Classes can be grouped into two functions Classes that manipulate the file system Classes used to save and retrieve data to/from external storage devices CNIT 15500, Fall 2011 © 2011, Alka Harriger  Slide4
Background image of page 4
Data Can be stored in a file as plain-text strings or as binary data Text files Usually have a file extension of .txt
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2012 for the course CIT 155 taught by Professor Lutes during the Fall '10 term at Purdue University-West Lafayette.

Page1 / 15

C155-112111-Chap10Files - CPT 155 Introduction to...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online