Create a class named cellphone which will represent the code

Assignment Help Management Information Sys
Reference no: EM131990501

Part 1

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). 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.

• A variable of type string named display that will contain the text that the cell phone's display will show at any time.

• A variable of type bool named on that indicates whether the cell phone is turned on or not.

• A variable of type string named currentCall that contains the contact number of a currently active call.

• A variable of type bool named callActive that indicates whether a call is currently active or not.

The following private member functions are needed:

• A function named contactCount that returns the number of contacts currently stored in the contacts array.

• A function named showOutput that outputs the content of the display variable to the screen.

• 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."

The following public member functions are needed:

• 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.

• 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.

• A function named display Contact Number Information 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*

• A function named powerDown that sets the cell phone's status to o?and sets the display variable to "This device has been powered o?".

Please note that in the class above, anytime the display variable changes, the function show Output should be invoked/called in order to show the new content on the screen.

Part 2

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".

2. Display a menu to the user with the following options: A. Turn o?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 o?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 userand invoking the display Contact Number Information 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 o?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.

Reference no: EM131990501

Questions Cloud

Write a paragraph about what you already knew about topic : Write a short paragraph about what you already knew about the topic you selected prior to this course, based on your personal history or experiences.
Overview of islamic financial markets and its regulations : OVERVIEW OF ISLAMIC FINANCIAL MARKETS AND ITS REGULATIONS
Describe three to five driving forces that led to civil war : Describe three to five driving forces that led to the Civil War. State your thesis on the significance of this slavery issue, as exemplified in your research.
Analyze the key e-marketing issues : Analyze the e-business strategy the company has formulate and implemented to face the identified issues (keep in mind that issues might also be opportunities
Create a class named cellphone which will represent the code : Create a class named CellPhone which will represent the code to manage a cell phone's operating system.
Analyze the implications of each issue : Describe and analyze the implications of each issue, including who or what were affected by the company's response. In identifying issues and addressing.
Design your own text-based adventure game : Design your own text-based adventure game, using the given zuul game as a starting point. Write a brief description of your game, including setting for game
Discuss the basics of strategic planning : This course features a debate component within the Discussion Boards. To prepare for the debate topic within this course, view a video that reviews.
Describe the acquisition process in the it industry : This is just for the one server blade. Storage devices such as tape drives, tapes, storage for the tapes, racks, environmental controls, security controls.

Reviews

Write a Review

Management Information Sys Questions & Answers

  Information technology and the changing fabric

Illustrations of concepts from organizational structure, organizational power and politics and organizational culture.

  Case study: software-as-a-service goes mainstream

Explain the questions based on case study. case study - salesforce.com: software-as-a-service goes mainstream

  Research proposal on cloud computing

The usage and influence of outsourcing and cloud computing on Management Information Systems is the proposed topic of the research project.

  Host an e-commerce site for a small start-up company

This paper will help develop internet skills in commercial services for hosting an e-commerce site for a small start-up company.

  How are internet technologies affecting the structure

How are Internet technologies affecting the structure and work roles of modern organizations?

  Segregation of duties in the personal computing environment

Why is inadequate segregation of duties a problem in the personal computing environment?

  Social media strategy implementation and evaluation

Social media strategy implementation and evaluation

  Problems in the personal computing environment

What is the basic purpose behind segregation of duties a problem in the personal computing environment?

  Role of it/is in an organisation

Prepare a presentation on Information Systems and Organizational changes

  Perky pies

Information systems to adequately manage supply both up and down stream.

  Mark the equilibrium price and quantity

The demand schedule for computer chips.

  Visit and analyze the company-specific web-site

Visit and analyze the Company-specific web-site with respect to E-Commerce issues

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd