SlideShare a Scribd company logo
This assignment has two parts. The first part requires you to
create a class and implement it. The second part requires you to
use that class in a specified program. Any errors on the first
part will not be carried over in grading to the second part.
You should have 3 files (CellPhone.h, CellPhone.cpp &
main.cpp) into a Zip file.
Part 1
96 points (Allocation of points is shown in brackets below)
Create a class named
CellPhone
which will represent the code to manage a cell phone’s
operating system. Split your declaration and definition into a
header (.h) file and an implementation file (.cpp).
(5)
It must meet the requirements specified below:
The private member variables needed are:
• An array of structs of the type
Contact
(you must create this struct yourself) named
contacts
. Each struct should be able to store a contact’s First Name,
Last Name, home contact
number and mobile contact number. Your class should be able
to store a maximum of 200 contacts.
(14)
• A variable of type string named
display
that will contain the text that the cell phone’s display will show
at any time.
(3)
• A variable of type bool named
on
that indicates whether the cell phone is turned on or not.
(3)
• A variable of type string named
currentCall
that contains the contact number of a currently active call.
(3)
• A variable of type bool named
callActive
that indicates whether a call is currently active or not.
(3)
The following private member functions are needed:
• A function named
contactCount
that returns the number of contacts currently stored in the
contacts
array.
(7)
• A function named
showOutput
that outputs the content of the
display
variable to the screen.
(4)
• A constructor function that sets the class variable
on
to true, and sets
display
to the message
“Welcome to the CIS3100 Operating System. Your virtual cell
phone is now on.”
(5)
The following public member functions are needed:
2
• A function named
newContact
that accepts a new contact’s First Name, Last Name, home
contact number and mobile contact number as parameters and
stores the new contact in the
contacts
array. This function should first check to see if there is any
room to store new contacts and return
false
if there is not.
(10)
• A function named
dialContact
that accepts an existing contact’s First Name & Last Name,
searches the
contacts
array for this contact, asks the user whether they’d like to dial
the home contact number or the mobile contact number, then
stores the user choice in the
currentCall
variable. The contact number chosen should also be stored in
the
display
variable.
(14)
• A function named
displayContactNumberInformation
that accepts an existing contact’s home contact number or their
mobile contact number as a parameter and retrieves the contact
from the
contacts
array. After retrieving the contact, it should store the contact
information in the
display
variable in the following format:
First Name:
Contact’s First Name
Last Name:
Contact’s Last Name
*Replace the above content in bold with the respective text
from the contact* (15)
• A function named
powerDown
that sets the cell phone’s status to off and sets the
display
variable to “This device has been powered off”
(5)
Please note that in the class above, anytime the
display
variable changes, the function
showOutput
should be invoked/called in order to show the new content on
the screen.
(5)
Part 2
30 Points (Allocation of points is shown in brackets below)
In a main.cpp file, make use of the class you create in Part 1 by
including the class header file.
This main part of your program should perform the following
steps:
1. Display a welcome message to the user - “Hello User. Would
you like to turn on this cell phone?” If the user says yes, initiate
your
CellPhone
class, and proceed to step 2. If the user says no, end the
program with “Thank you. Please restart the program when you
wish to use the device”.
(5)
2. Display a menu to the user with the following options: A.
Turn off Cell Phone
B. Add A New Contact
C. Display Contact Information
D. Dial Contact
You should accept a choice from the user and perform the the
corresponding function listed below
A - Turn off the cell phone using the
powerDown
function of the
CellPhone
class
B - Accept a new contact by requesting the proper information
from the user and invoking the
newContact
function
C - Display the information for an existing contact by
requesting the number from the user
and invoking the
displayContactNumberInformation
function.
D - Dial a contact by accepting the contact First Name and Last
Name from the user and invoking the
dialContact
function.
The menu should be recurring on screen until the user chooses
to turn off the cell phone, in which case the program ends.
(15)
CODE ORGANIZATION - 10
Consider carefully how you structure/organize this part of the
program’s code.

More Related Content

Similar to This assignment has two parts. The first part requires you to cr.docx

Copying number ranges in SAP FICO ECC
Copying number ranges  in SAP FICO ECCCopying number ranges  in SAP FICO ECC
Copying number ranges in SAP FICO ECCSrinivas Rao
 
Bis 311 final examination answers
Bis 311 final examination answersBis 311 final examination answers
Bis 311 final examination answersRandalHoffman
 
EN3085 Assessed Coursework 1 1. Create a class Complex .docx
EN3085 Assessed Coursework 1  1. Create a class Complex .docxEN3085 Assessed Coursework 1  1. Create a class Complex .docx
EN3085 Assessed Coursework 1 1. Create a class Complex .docxgidmanmary
 
Microsoft MCSD.NET 70-481 it examen dumps
Microsoft MCSD.NET 70-481 it examen dumpsMicrosoft MCSD.NET 70-481 it examen dumps
Microsoft MCSD.NET 70-481 it examen dumpslilylucy
 
Program Specifications ( please show full working code that builds s.pdf
Program Specifications ( please show full working code that builds s.pdfProgram Specifications ( please show full working code that builds s.pdf
Program Specifications ( please show full working code that builds s.pdfalsofshionchennai
 
#1 How to develop a VoIP softphone in C# by using Ozeki VoIP SIP SDK - Part 1
#1 How to develop a VoIP softphone in C# by using Ozeki VoIP SIP SDK - Part 1#1 How to develop a VoIP softphone in C# by using Ozeki VoIP SIP SDK - Part 1
#1 How to develop a VoIP softphone in C# by using Ozeki VoIP SIP SDK - Part 1Ozeki Informatics Ltd.
 
c++ Question
c++  Questionc++  Question
c++ QuestionHamza4467
 
INTRODUCTION The goal of this programming project is to entble studen.pdf
 INTRODUCTION The goal of this programming project is to entble studen.pdf INTRODUCTION The goal of this programming project is to entble studen.pdf
INTRODUCTION The goal of this programming project is to entble studen.pdfameancal
 
Book management system
Book management systemBook management system
Book management systemSHARDA SHARAN
 
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docxAssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docxssuser562afc1
 
Open a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdfOpen a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdfNathan2rSPeakes
 
PT1420 File Access and Visual Basic .docx
PT1420 File Access and Visual Basic                      .docxPT1420 File Access and Visual Basic                      .docx
PT1420 File Access and Visual Basic .docxamrit47
 
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxCRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxfaithxdunce63732
 
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docxShelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docxmaoanderton
 
PT1420 Decision Structures in Pseudocode and Visual Basic .docx
PT1420 Decision Structures in Pseudocode and Visual Basic .docxPT1420 Decision Structures in Pseudocode and Visual Basic .docx
PT1420 Decision Structures in Pseudocode and Visual Basic .docxamrit47
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of ckinish kumar
 

Similar to This assignment has two parts. The first part requires you to cr.docx (20)

OOP Assignment 03.pdf
OOP Assignment 03.pdfOOP Assignment 03.pdf
OOP Assignment 03.pdf
 
Copying number ranges in SAP FICO ECC
Copying number ranges  in SAP FICO ECCCopying number ranges  in SAP FICO ECC
Copying number ranges in SAP FICO ECC
 
Bis 311 final examination answers
Bis 311 final examination answersBis 311 final examination answers
Bis 311 final examination answers
 
EN3085 Assessed Coursework 1 1. Create a class Complex .docx
EN3085 Assessed Coursework 1  1. Create a class Complex .docxEN3085 Assessed Coursework 1  1. Create a class Complex .docx
EN3085 Assessed Coursework 1 1. Create a class Complex .docx
 
Microsoft MCSD.NET 70-481 it examen dumps
Microsoft MCSD.NET 70-481 it examen dumpsMicrosoft MCSD.NET 70-481 it examen dumps
Microsoft MCSD.NET 70-481 it examen dumps
 
Program Specifications ( please show full working code that builds s.pdf
Program Specifications ( please show full working code that builds s.pdfProgram Specifications ( please show full working code that builds s.pdf
Program Specifications ( please show full working code that builds s.pdf
 
Unit-III.pptx
Unit-III.pptxUnit-III.pptx
Unit-III.pptx
 
#1 How to develop a VoIP softphone in C# by using Ozeki VoIP SIP SDK - Part 1
#1 How to develop a VoIP softphone in C# by using Ozeki VoIP SIP SDK - Part 1#1 How to develop a VoIP softphone in C# by using Ozeki VoIP SIP SDK - Part 1
#1 How to develop a VoIP softphone in C# by using Ozeki VoIP SIP SDK - Part 1
 
c++ Question
c++  Questionc++  Question
c++ Question
 
INTRODUCTION The goal of this programming project is to entble studen.pdf
 INTRODUCTION The goal of this programming project is to entble studen.pdf INTRODUCTION The goal of this programming project is to entble studen.pdf
INTRODUCTION The goal of this programming project is to entble studen.pdf
 
Oopp Lab Work
Oopp Lab WorkOopp Lab Work
Oopp Lab Work
 
Book management system
Book management systemBook management system
Book management system
 
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docxAssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
 
Open a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdfOpen a new project in Visual Studio Community and name it in the form.pdf
Open a new project in Visual Studio Community and name it in the form.pdf
 
PT1420 File Access and Visual Basic .docx
PT1420 File Access and Visual Basic                      .docxPT1420 File Access and Visual Basic                      .docx
PT1420 File Access and Visual Basic .docx
 
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxCRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
 
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docxShelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
 
PT1420 Decision Structures in Pseudocode and Visual Basic .docx
PT1420 Decision Structures in Pseudocode and Visual Basic .docxPT1420 Decision Structures in Pseudocode and Visual Basic .docx
PT1420 Decision Structures in Pseudocode and Visual Basic .docx
 
Elastix call center_manual_eng
Elastix call center_manual_engElastix call center_manual_eng
Elastix call center_manual_eng
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of c
 

More from gasciognecaren

1.In no more than 3-4 sentences, explain why high market-capitalizat.docx
1.In no more than 3-4 sentences, explain why high market-capitalizat.docx1.In no more than 3-4 sentences, explain why high market-capitalizat.docx
1.In no more than 3-4 sentences, explain why high market-capitalizat.docxgasciognecaren
 
1.Longest WordsWrite a Python program that reads wor.docx
1.Longest WordsWrite a Python program that reads wor.docx1.Longest WordsWrite a Python program that reads wor.docx
1.Longest WordsWrite a Python program that reads wor.docxgasciognecaren
 
1.Probable reasons for the collapse of Mayan civilization include a.docx
1.Probable reasons for the collapse of Mayan civilization include a.docx1.Probable reasons for the collapse of Mayan civilization include a.docx
1.Probable reasons for the collapse of Mayan civilization include a.docxgasciognecaren
 
1.Matching How do astronomers determine the physical char.docx
1.Matching How do astronomers determine the physical char.docx1.Matching How do astronomers determine the physical char.docx
1.Matching How do astronomers determine the physical char.docxgasciognecaren
 
1.If President Barack Obama invited you to the White House to partic.docx
1.If President Barack Obama invited you to the White House to partic.docx1.If President Barack Obama invited you to the White House to partic.docx
1.If President Barack Obama invited you to the White House to partic.docxgasciognecaren
 
1.How does DNA establish identity2. What is similar and differe.docx
1.How does DNA establish identity2. What is similar and differe.docx1.How does DNA establish identity2. What is similar and differe.docx
1.How does DNA establish identity2. What is similar and differe.docxgasciognecaren
 
1.purpose2.objectives3.scope4.Function of EOP5.Rules.docx
1.purpose2.objectives3.scope4.Function of EOP5.Rules.docx1.purpose2.objectives3.scope4.Function of EOP5.Rules.docx
1.purpose2.objectives3.scope4.Function of EOP5.Rules.docxgasciognecaren
 
1.Qu’est-ce que c’est(2.5)C’est quelque chose….docx
1.Qu’est-ce que c’est(2.5)C’est quelque chose….docx1.Qu’est-ce que c’est(2.5)C’est quelque chose….docx
1.Qu’est-ce que c’est(2.5)C’est quelque chose….docxgasciognecaren
 
1.Read over the handout titled Academic Summaries,posted b.docx
1.Read over the handout titled Academic Summaries,posted b.docx1.Read over the handout titled Academic Summaries,posted b.docx
1.Read over the handout titled Academic Summaries,posted b.docxgasciognecaren
 
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docxgasciognecaren
 
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docxgasciognecaren
 
1.Find a test to assess, intelligence or education, find a similar a.docx
1.Find a test to assess, intelligence or education, find a similar a.docx1.Find a test to assess, intelligence or education, find a similar a.docx
1.Find a test to assess, intelligence or education, find a similar a.docxgasciognecaren
 
1.Over the past few years, we have seen both emerging and reemerging.docx
1.Over the past few years, we have seen both emerging and reemerging.docx1.Over the past few years, we have seen both emerging and reemerging.docx
1.Over the past few years, we have seen both emerging and reemerging.docxgasciognecaren
 
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docxgasciognecaren
 
1.In patients with acute respiratory distress syndrome (P), .docx
1.In patients with acute respiratory distress syndrome (P), .docx1.In patients with acute respiratory distress syndrome (P), .docx
1.In patients with acute respiratory distress syndrome (P), .docxgasciognecaren
 
1.How is culture reflected in television and movies What relations.docx
1.How is culture reflected in television and movies What relations.docx1.How is culture reflected in television and movies What relations.docx
1.How is culture reflected in television and movies What relations.docxgasciognecaren
 
1.How are the firm’s operational and key risk factors captured in th.docx
1.How are the firm’s operational and key risk factors captured in th.docx1.How are the firm’s operational and key risk factors captured in th.docx
1.How are the firm’s operational and key risk factors captured in th.docxgasciognecaren
 
1.How do you define modernist literature and how does it relate to o.docx
1.How do you define modernist literature and how does it relate to o.docx1.How do you define modernist literature and how does it relate to o.docx
1.How do you define modernist literature and how does it relate to o.docxgasciognecaren
 
1.GOAL STATEMENT Please complete the following goal statement.docx
1.GOAL STATEMENT Please complete the following goal statement.docx1.GOAL STATEMENT Please complete the following goal statement.docx
1.GOAL STATEMENT Please complete the following goal statement.docxgasciognecaren
 
1.Functional Analysis Interview (FAI) is a type of structured in.docx
1.Functional Analysis Interview (FAI) is a type of structured in.docx1.Functional Analysis Interview (FAI) is a type of structured in.docx
1.Functional Analysis Interview (FAI) is a type of structured in.docxgasciognecaren
 

More from gasciognecaren (20)

1.In no more than 3-4 sentences, explain why high market-capitalizat.docx
1.In no more than 3-4 sentences, explain why high market-capitalizat.docx1.In no more than 3-4 sentences, explain why high market-capitalizat.docx
1.In no more than 3-4 sentences, explain why high market-capitalizat.docx
 
1.Longest WordsWrite a Python program that reads wor.docx
1.Longest WordsWrite a Python program that reads wor.docx1.Longest WordsWrite a Python program that reads wor.docx
1.Longest WordsWrite a Python program that reads wor.docx
 
1.Probable reasons for the collapse of Mayan civilization include a.docx
1.Probable reasons for the collapse of Mayan civilization include a.docx1.Probable reasons for the collapse of Mayan civilization include a.docx
1.Probable reasons for the collapse of Mayan civilization include a.docx
 
1.Matching How do astronomers determine the physical char.docx
1.Matching How do astronomers determine the physical char.docx1.Matching How do astronomers determine the physical char.docx
1.Matching How do astronomers determine the physical char.docx
 
1.If President Barack Obama invited you to the White House to partic.docx
1.If President Barack Obama invited you to the White House to partic.docx1.If President Barack Obama invited you to the White House to partic.docx
1.If President Barack Obama invited you to the White House to partic.docx
 
1.How does DNA establish identity2. What is similar and differe.docx
1.How does DNA establish identity2. What is similar and differe.docx1.How does DNA establish identity2. What is similar and differe.docx
1.How does DNA establish identity2. What is similar and differe.docx
 
1.purpose2.objectives3.scope4.Function of EOP5.Rules.docx
1.purpose2.objectives3.scope4.Function of EOP5.Rules.docx1.purpose2.objectives3.scope4.Function of EOP5.Rules.docx
1.purpose2.objectives3.scope4.Function of EOP5.Rules.docx
 
1.Qu’est-ce que c’est(2.5)C’est quelque chose….docx
1.Qu’est-ce que c’est(2.5)C’est quelque chose….docx1.Qu’est-ce que c’est(2.5)C’est quelque chose….docx
1.Qu’est-ce que c’est(2.5)C’est quelque chose….docx
 
1.Read over the handout titled Academic Summaries,posted b.docx
1.Read over the handout titled Academic Summaries,posted b.docx1.Read over the handout titled Academic Summaries,posted b.docx
1.Read over the handout titled Academic Summaries,posted b.docx
 
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
1.Rebecca SperryMar 29, 2020Mar 29 at 552pmManage Discussion .docx
 
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
1.Probability ConceptsDuring an epidemic of disease, a doctor se.docx
 
1.Find a test to assess, intelligence or education, find a similar a.docx
1.Find a test to assess, intelligence or education, find a similar a.docx1.Find a test to assess, intelligence or education, find a similar a.docx
1.Find a test to assess, intelligence or education, find a similar a.docx
 
1.Over the past few years, we have seen both emerging and reemerging.docx
1.Over the past few years, we have seen both emerging and reemerging.docx1.Over the past few years, we have seen both emerging and reemerging.docx
1.Over the past few years, we have seen both emerging and reemerging.docx
 
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
1.Ornette Coleman Lonely Womanhttpswww.youtube.comwatchv=D.docx
 
1.In patients with acute respiratory distress syndrome (P), .docx
1.In patients with acute respiratory distress syndrome (P), .docx1.In patients with acute respiratory distress syndrome (P), .docx
1.In patients with acute respiratory distress syndrome (P), .docx
 
1.How is culture reflected in television and movies What relations.docx
1.How is culture reflected in television and movies What relations.docx1.How is culture reflected in television and movies What relations.docx
1.How is culture reflected in television and movies What relations.docx
 
1.How are the firm’s operational and key risk factors captured in th.docx
1.How are the firm’s operational and key risk factors captured in th.docx1.How are the firm’s operational and key risk factors captured in th.docx
1.How are the firm’s operational and key risk factors captured in th.docx
 
1.How do you define modernist literature and how does it relate to o.docx
1.How do you define modernist literature and how does it relate to o.docx1.How do you define modernist literature and how does it relate to o.docx
1.How do you define modernist literature and how does it relate to o.docx
 
1.GOAL STATEMENT Please complete the following goal statement.docx
1.GOAL STATEMENT Please complete the following goal statement.docx1.GOAL STATEMENT Please complete the following goal statement.docx
1.GOAL STATEMENT Please complete the following goal statement.docx
 
1.Functional Analysis Interview (FAI) is a type of structured in.docx
1.Functional Analysis Interview (FAI) is a type of structured in.docx1.Functional Analysis Interview (FAI) is a type of structured in.docx
1.Functional Analysis Interview (FAI) is a type of structured in.docx
 

Recently uploaded

Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chipsGeoBlogs
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...Nguyen Thanh Tu Collection
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345beazzy04
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePedroFerreira53928
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxShibin Azad
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptSourabh Kumar
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxakshayaramakrishnan21
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsCol Mukteshwar Prasad
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resourcesdimpy50
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptxmansk2
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportAvinash Rai
 
Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfDr. M. Kumaresan Hort.
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxDenish Jangid
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 

Recently uploaded (20)

Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdf
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 

This assignment has two parts. The first part requires you to cr.docx

  • 1. This assignment has two parts. The first part requires you to create a class and implement it. The second part requires you to use that class in a specified program. Any errors on the first part will not be carried over in grading to the second part. You should have 3 files (CellPhone.h, CellPhone.cpp & main.cpp) into a Zip file. Part 1 96 points (Allocation of points is shown in brackets below) Create a class named CellPhone which will represent the code to manage a cell phone’s operating system. Split your declaration and definition into a header (.h) file and an implementation file (.cpp). (5) It must meet the requirements specified below: The private member variables needed are: • An array of structs of the type Contact (you must create this struct yourself) named contacts . Each struct should be able to store a contact’s First Name, Last Name, home contact number and mobile contact number. Your class should be able to store a maximum of 200 contacts. (14)
  • 2. • A variable of type string named display that will contain the text that the cell phone’s display will show at any time. (3) • A variable of type bool named on that indicates whether the cell phone is turned on or not. (3) • A variable of type string named currentCall that contains the contact number of a currently active call. (3) • A variable of type bool named callActive that indicates whether a call is currently active or not. (3) The following private member functions are needed: • A function named contactCount that returns the number of contacts currently stored in the contacts array. (7) • A function named showOutput that outputs the content of the display
  • 3. variable to the screen. (4) • A constructor function that sets the class variable on to true, and sets display to the message “Welcome to the CIS3100 Operating System. Your virtual cell phone is now on.” (5) The following public member functions are needed: 2 • A function named newContact that accepts a new contact’s First Name, Last Name, home contact number and mobile contact number as parameters and stores the new contact in the contacts array. This function should first check to see if there is any room to store new contacts and return false if there is not. (10) • A function named dialContact that accepts an existing contact’s First Name & Last Name, searches the contacts array for this contact, asks the user whether they’d like to dial
  • 4. the home contact number or the mobile contact number, then stores the user choice in the currentCall variable. The contact number chosen should also be stored in the display variable. (14) • A function named displayContactNumberInformation that accepts an existing contact’s home contact number or their mobile contact number as a parameter and retrieves the contact from the contacts array. After retrieving the contact, it should store the contact information in the display variable in the following format: First Name: Contact’s First Name Last Name: Contact’s Last Name *Replace the above content in bold with the respective text from the contact* (15) • A function named powerDown that sets the cell phone’s status to off and sets the display variable to “This device has been powered off”
  • 5. (5) Please note that in the class above, anytime the display variable changes, the function showOutput should be invoked/called in order to show the new content on the screen. (5) Part 2 30 Points (Allocation of points is shown in brackets below) In a main.cpp file, make use of the class you create in Part 1 by including the class header file. This main part of your program should perform the following steps: 1. Display a welcome message to the user - “Hello User. Would you like to turn on this cell phone?” If the user says yes, initiate your CellPhone class, and proceed to step 2. If the user says no, end the program with “Thank you. Please restart the program when you wish to use the device”. (5) 2. Display a menu to the user with the following options: A. Turn off Cell Phone B. Add A New Contact C. Display Contact Information
  • 6. D. Dial Contact You should accept a choice from the user and perform the the corresponding function listed below A - Turn off the cell phone using the powerDown function of the CellPhone class B - Accept a new contact by requesting the proper information from the user and invoking the newContact function C - Display the information for an existing contact by requesting the number from the user and invoking the displayContactNumberInformation function. D - Dial a contact by accepting the contact First Name and Last Name from the user and invoking the dialContact function. The menu should be recurring on screen until the user chooses to turn off the cell phone, in which case the program ends. (15) CODE ORGANIZATION - 10
  • 7. Consider carefully how you structure/organize this part of the program’s code.