SlideShare a Scribd company logo
1 of 7
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

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 

Recently uploaded (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 

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.