SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
List different methods for field
organization.
Continue with the company class;
use fixed length ,
use length indicator,
use delimiter,
use KeyWord.
Dr. Hussien M. Sharaf 2
Dr. Hussien M. Sharaf 3
Fixed
length
Variable length
Length
indicator
Field
delimiter
Keyword
=Value
Like Tags of
HTML and XML
Each field has a fixed length of bytes.
The length must be the max expected length.
Problems:
1. The estimation of max length.
2. The choice of a character to fill the remaining
space.
Dr. Hussien M. Sharaf 4
a) Length indicator:
To store the field length just ahead of the field.
Problems:
1. The field length must not be too long (less than
256 bytes) to be stored in a single byte.
2. Needs more programming effort.
3. Requires at least two disk trips for each field.
Dr. Hussien M. Sharaf 5
2. Variable length fields
b) Field delimiter:
To choose a special character that will not appear
within a field and then insert that after each field .
Problems:
1. The choice of a delimiter character that does not get
in the way of processing (ex. White space is not a
good choice cause the field may contain spaces
within it like “address fields” same for @).
Dr. Hussien M. Sharaf 6
Continue Variable length fields
c) Keyword = Value:
• The field provides information about itself by using a
keyword to identify each field.
Example: last=sharaf first=hussein.
• It is often combined with another format (like
delimiters) to separate each value from the keyword
of the following field.
Advantages:
1. It is easy to say which fields are contained in a file.
2. It is a good format for dealing with missing fields.
Dr. Hussien M. Sharaf 7
Continue Variable length fields
Dr. Hussien M. Sharaf 8
User Interface
Classes containing any
processing of data
//Declarations
while (ExitProgram!=true)
{ //take user choice
switch (UserChoice)
{ case 'I':
case 'i':
//handle user Choice
case'E':
case'e':ExitProgram=true; break;
}
}
system("pause");
Dr. Hussien M. Sharaf 9
1. Start by determining Output.
2. List the inputs.
3. Think about processing.
Continue using the CompanyInfo class:
In assignment #3 we overloaded operators to read and write
comma delimited fields.
Add a method(not an overloaded operator) that takes
in ostream and writes to it a company record.
1. Fields have length indicator of type short.
2. Modify the driver(main) to use this class based on the
template Menu.
Example:
03155 03All 15A-z Maintenance 05Malek 01- 32902 Bestel Avenue - Garden
Grove..
Dr. Hussien M. Sharaf 11
Continue using the CompanyInfo class:
Write a method(not an overloaded operator) that
takes in istream and reads from it a company record.
1. Fields have length indicator of type short.
2. Write a driver to use this class based on the
template Menu.
Example:
03155 03All 15A-z Maintenance 05Malek 01- 32902 Bestel
Avenue - Garden Grove..
Note that the first two bytes are the length indicator.
Dr. Hussien M. Sharaf 12
Next week is the deadline.
No excuses.
Don’t wait until last day.
I can help you to the highest limit within the next
3 days.
Dr. Hussien M. Sharaf 13
1. Delete the “bin” and “obj” folders.
2. Compress the solution folder using
winrar.
3. Rename the compressed file as follows:
StudentName_ID_A4.rar
StudentName_ID_A5.rar
4. Email to: n.abdelhameed@fci-cu.edu.eg
with your ID in the subject.
Dr. Hussien M. Sharaf 14
CS215 - Lec 4  single record organization

Más contenido relacionado

Destacado

Operating System Multiple Choice Questions
Operating System Multiple Choice QuestionsOperating System Multiple Choice Questions
Operating System Multiple Choice QuestionsShusil Baral
 
Collections of CS Multiple Choice Questions
Collections of CS Multiple Choice QuestionsCollections of CS Multiple Choice Questions
Collections of CS Multiple Choice QuestionsShusil Baral
 
Basic IT Multiple Choice Questions
Basic IT Multiple Choice QuestionsBasic IT Multiple Choice Questions
Basic IT Multiple Choice QuestionsShusil Baral
 
Computer Networking Multiple Choice Questions
Computer Networking Multiple Choice QuestionsComputer Networking Multiple Choice Questions
Computer Networking Multiple Choice QuestionsShusil Baral
 
DBMS Multiple Choice Questions
DBMS Multiple Choice QuestionsDBMS Multiple Choice Questions
DBMS Multiple Choice QuestionsShusil Baral
 

Destacado (6)

Operating System Multiple Choice Questions
Operating System Multiple Choice QuestionsOperating System Multiple Choice Questions
Operating System Multiple Choice Questions
 
Collections of CS Multiple Choice Questions
Collections of CS Multiple Choice QuestionsCollections of CS Multiple Choice Questions
Collections of CS Multiple Choice Questions
 
Basic IT Multiple Choice Questions
Basic IT Multiple Choice QuestionsBasic IT Multiple Choice Questions
Basic IT Multiple Choice Questions
 
Computer Networking Multiple Choice Questions
Computer Networking Multiple Choice QuestionsComputer Networking Multiple Choice Questions
Computer Networking Multiple Choice Questions
 
DBMS Multiple Choice Questions
DBMS Multiple Choice QuestionsDBMS Multiple Choice Questions
DBMS Multiple Choice Questions
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 

Similar a CS215 - Lec 4 single record organization

76829060 java-coding-conventions
76829060 java-coding-conventions76829060 java-coding-conventions
76829060 java-coding-conventionsslavicp
 
Best Coding Practices in Java and C++
Best Coding Practices in Java and C++Best Coding Practices in Java and C++
Best Coding Practices in Java and C++Nitin Aggarwal
 
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
import java.util.Scanner;Henry Cutler ID 1234  7202.docximport java.util.Scanner;Henry Cutler ID 1234  7202.docx
import java.util.Scanner;Henry Cutler ID 1234 7202.docxwilcockiris
 
C programming day#3.
C programming day#3.C programming day#3.
C programming day#3.Mohamed Fawzy
 
Bt0065, c programming and data structures
Bt0065, c programming and data structuresBt0065, c programming and data structures
Bt0065, c programming and data structuressmumbahelp
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDeepikaV81
 
Lession 5 the columns of a table
Lession 5 the columns of a tableLession 5 the columns of a table
Lession 5 the columns of a tableĐỗ Đức Hùng
 
ECS 60 Programming Assignment #1 (50 points) Winter 2016 .docx
ECS 60 Programming Assignment #1 (50 points) Winter 2016 .docxECS 60 Programming Assignment #1 (50 points) Winter 2016 .docx
ECS 60 Programming Assignment #1 (50 points) Winter 2016 .docxjack60216
 
Coding Standards & Best Practices for iOS/C#
Coding Standards & Best Practices for iOS/C#Coding Standards & Best Practices for iOS/C#
Coding Standards & Best Practices for iOS/C#Asim Rais Siddiqui
 
Git_Practices - Guidelines.pdf
Git_Practices - Guidelines.pdfGit_Practices - Guidelines.pdf
Git_Practices - Guidelines.pdfharshit259398
 

Similar a CS215 - Lec 4 single record organization (20)

CS215 - Lec 5 record organization
CS215 - Lec 5  record organizationCS215 - Lec 5  record organization
CS215 - Lec 5 record organization
 
CS215 - Lec 3 single record operations
CS215 - Lec 3  single record operationsCS215 - Lec 3  single record operations
CS215 - Lec 3 single record operations
 
CS215 - Lec 6 record index
CS215 - Lec 6  record indexCS215 - Lec 6  record index
CS215 - Lec 6 record index
 
Cs419 Compiler lec1&2 introduction
Cs419 Compiler lec1&2  introductionCs419 Compiler lec1&2  introduction
Cs419 Compiler lec1&2 introduction
 
76829060 java-coding-conventions
76829060 java-coding-conventions76829060 java-coding-conventions
76829060 java-coding-conventions
 
CS215 Lec 1 introduction
CS215 Lec 1   introductionCS215 Lec 1   introduction
CS215 Lec 1 introduction
 
A02 assignment-2
A02 assignment-2A02 assignment-2
A02 assignment-2
 
Best Coding Practices in Java and C++
Best Coding Practices in Java and C++Best Coding Practices in Java and C++
Best Coding Practices in Java and C++
 
OOPSCA1.pptx
OOPSCA1.pptxOOPSCA1.pptx
OOPSCA1.pptx
 
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
import java.util.Scanner;Henry Cutler ID 1234  7202.docximport java.util.Scanner;Henry Cutler ID 1234  7202.docx
import java.util.Scanner;Henry Cutler ID 1234 7202.docx
 
C programming day#3.
C programming day#3.C programming day#3.
C programming day#3.
 
Protocol Buffers
Protocol BuffersProtocol Buffers
Protocol Buffers
 
Bt0065, c programming and data structures
Bt0065, c programming and data structuresBt0065, c programming and data structures
Bt0065, c programming and data structures
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Lession 5 the columns of a table
Lession 5 the columns of a tableLession 5 the columns of a table
Lession 5 the columns of a table
 
Cassandra
CassandraCassandra
Cassandra
 
ECS 60 Programming Assignment #1 (50 points) Winter 2016 .docx
ECS 60 Programming Assignment #1 (50 points) Winter 2016 .docxECS 60 Programming Assignment #1 (50 points) Winter 2016 .docx
ECS 60 Programming Assignment #1 (50 points) Winter 2016 .docx
 
Coding Standards & Best Practices for iOS/C#
Coding Standards & Best Practices for iOS/C#Coding Standards & Best Practices for iOS/C#
Coding Standards & Best Practices for iOS/C#
 
Git_Practices - Guidelines.pdf
Git_Practices - Guidelines.pdfGit_Practices - Guidelines.pdf
Git_Practices - Guidelines.pdf
 
C Programming - Refresher - Part IV
C Programming - Refresher - Part IVC Programming - Refresher - Part IV
C Programming - Refresher - Part IV
 

Más de Arab Open University and Cairo University

Más de Arab Open University and Cairo University (20)

Infos2014
Infos2014Infos2014
Infos2014
 
File Organization & processing Mid term summer 2014 - modelanswer
File Organization & processing Mid term summer 2014 - modelanswerFile Organization & processing Mid term summer 2014 - modelanswer
File Organization & processing Mid term summer 2014 - modelanswer
 
Model answer of compilers june spring 2013
Model answer of compilers june spring 2013Model answer of compilers june spring 2013
Model answer of compilers june spring 2013
 
Model answer of exam TC_spring 2013
Model answer of exam TC_spring 2013Model answer of exam TC_spring 2013
Model answer of exam TC_spring 2013
 
Theory of computation Lec6
Theory of computation Lec6Theory of computation Lec6
Theory of computation Lec6
 
Lec4
Lec4Lec4
Lec4
 
Theory of computation Lec3 dfa
Theory of computation Lec3 dfaTheory of computation Lec3 dfa
Theory of computation Lec3 dfa
 
Theory of computation Lec2
Theory of computation Lec2Theory of computation Lec2
Theory of computation Lec2
 
Theory of computation Lec1
Theory of computation Lec1Theory of computation Lec1
Theory of computation Lec1
 
Theory of computation Lec7 pda
Theory of computation Lec7 pdaTheory of computation Lec7 pda
Theory of computation Lec7 pda
 
Setup python with eclipse
Setup python with eclipseSetup python with eclipse
Setup python with eclipse
 
Cs419 lec8 top-down parsing
Cs419 lec8    top-down parsingCs419 lec8    top-down parsing
Cs419 lec8 top-down parsing
 
Cs419 lec11 bottom-up parsing
Cs419 lec11   bottom-up parsingCs419 lec11   bottom-up parsing
Cs419 lec11 bottom-up parsing
 
Cs419 lec12 semantic analyzer
Cs419 lec12  semantic analyzerCs419 lec12  semantic analyzer
Cs419 lec12 semantic analyzer
 
Cs419 lec9 constructing parsing table ll1
Cs419 lec9   constructing parsing table ll1Cs419 lec9   constructing parsing table ll1
Cs419 lec9 constructing parsing table ll1
 
Cs419 lec10 left recursion and left factoring
Cs419 lec10   left recursion and left factoringCs419 lec10   left recursion and left factoring
Cs419 lec10 left recursion and left factoring
 
Cs419 lec7 cfg
Cs419 lec7   cfgCs419 lec7   cfg
Cs419 lec7 cfg
 
Cs419 lec6 lexical analysis using nfa
Cs419 lec6   lexical analysis using nfaCs419 lec6   lexical analysis using nfa
Cs419 lec6 lexical analysis using nfa
 
Cs419 lec5 lexical analysis using dfa
Cs419 lec5   lexical analysis using dfaCs419 lec5   lexical analysis using dfa
Cs419 lec5 lexical analysis using dfa
 
Cs419 lec4 lexical analysis using re
Cs419 lec4   lexical analysis using reCs419 lec4   lexical analysis using re
Cs419 lec4 lexical analysis using re
 

Último

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 

Último (20)

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 

CS215 - Lec 4 single record organization

  • 1.
  • 2. List different methods for field organization. Continue with the company class; use fixed length , use length indicator, use delimiter, use KeyWord. Dr. Hussien M. Sharaf 2
  • 3. Dr. Hussien M. Sharaf 3 Fixed length Variable length Length indicator Field delimiter Keyword =Value Like Tags of HTML and XML
  • 4. Each field has a fixed length of bytes. The length must be the max expected length. Problems: 1. The estimation of max length. 2. The choice of a character to fill the remaining space. Dr. Hussien M. Sharaf 4
  • 5. a) Length indicator: To store the field length just ahead of the field. Problems: 1. The field length must not be too long (less than 256 bytes) to be stored in a single byte. 2. Needs more programming effort. 3. Requires at least two disk trips for each field. Dr. Hussien M. Sharaf 5 2. Variable length fields
  • 6. b) Field delimiter: To choose a special character that will not appear within a field and then insert that after each field . Problems: 1. The choice of a delimiter character that does not get in the way of processing (ex. White space is not a good choice cause the field may contain spaces within it like “address fields” same for @). Dr. Hussien M. Sharaf 6 Continue Variable length fields
  • 7. c) Keyword = Value: • The field provides information about itself by using a keyword to identify each field. Example: last=sharaf first=hussein. • It is often combined with another format (like delimiters) to separate each value from the keyword of the following field. Advantages: 1. It is easy to say which fields are contained in a file. 2. It is a good format for dealing with missing fields. Dr. Hussien M. Sharaf 7 Continue Variable length fields
  • 8. Dr. Hussien M. Sharaf 8 User Interface Classes containing any processing of data
  • 9. //Declarations while (ExitProgram!=true) { //take user choice switch (UserChoice) { case 'I': case 'i': //handle user Choice case'E': case'e':ExitProgram=true; break; } } system("pause"); Dr. Hussien M. Sharaf 9
  • 10. 1. Start by determining Output. 2. List the inputs. 3. Think about processing.
  • 11. Continue using the CompanyInfo class: In assignment #3 we overloaded operators to read and write comma delimited fields. Add a method(not an overloaded operator) that takes in ostream and writes to it a company record. 1. Fields have length indicator of type short. 2. Modify the driver(main) to use this class based on the template Menu. Example: 03155 03All 15A-z Maintenance 05Malek 01- 32902 Bestel Avenue - Garden Grove.. Dr. Hussien M. Sharaf 11
  • 12. Continue using the CompanyInfo class: Write a method(not an overloaded operator) that takes in istream and reads from it a company record. 1. Fields have length indicator of type short. 2. Write a driver to use this class based on the template Menu. Example: 03155 03All 15A-z Maintenance 05Malek 01- 32902 Bestel Avenue - Garden Grove.. Note that the first two bytes are the length indicator. Dr. Hussien M. Sharaf 12
  • 13. Next week is the deadline. No excuses. Don’t wait until last day. I can help you to the highest limit within the next 3 days. Dr. Hussien M. Sharaf 13
  • 14. 1. Delete the “bin” and “obj” folders. 2. Compress the solution folder using winrar. 3. Rename the compressed file as follows: StudentName_ID_A4.rar StudentName_ID_A5.rar 4. Email to: n.abdelhameed@fci-cu.edu.eg with your ID in the subject. Dr. Hussien M. Sharaf 14