Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The code for this assignment should be in C++. Not Java, Python, or C. The purpose of the 4th program is to implement the new

The code for this assignment should be in C++. Not Java, Python, or C.

The purpose of the 4th program is to implement the new concepts learned which include (a) pointers, (b) dynamically allocated arrays,(c) external data files and (d) classes Our goal is to continue to create programs with a small main function that delegates to a series of functions where the real work takes place. In this programming assignment, you are not allowed to use global variables.

You areallowed (as usual) to use the cstring library (e.g., strlen, strcpy, and strcmp).Limit your main (and all functions) to no more than 30 statements of code (for executable statements... not counting variable definitions, blank lines, lines with just curly brackets, or comments).

Program Assignment:

There are so many new advancements with technology. We can use our phones for programming, watching videos, surfing the internet, playing games, and so much more. There are devices that support the concept of electronic paper, so that we no longer need large file cabinets where we have to sort and organize paper.

For each of these technological advancements, there are positive and negative aspects. For example, with electronical paper, I can reduce my storage needs but I cant look at multiple pages at the same time. Do I consider other features such as touch screens, tablet functionality, and disk space for storage? With this program you help the user create and keep track of a wish list of new technology and the primary benefit and concern or draw back about each. Then, when the user is done, you can display all of the information to the user. In the end, all of this information

needs to be saved in an external data file so it isnt lost.The key is to create a class (e.g., Tech_List) with member functions to add a new

technology, rate the feature (establish the pros and cons), and then display them

.

For each individual technological item, you will keep the following information; you may use a struct or a class for this:

1.Name of the technology (e.g., Remarkable Tablet)

2. A description of the item (e.g., Electronic paper)

3.The approximate cost (e.g., $650)

4.The best feature (e.g., no more paper!)

5.The worst feature (e.g., you cant look at more than one page at a time)

6.General rating (e.g., 5 stars) Then, what is most interesting is to hold a list of all of the different hi-tech items that the user might be interested in. Here is the class interface that you should start with

(you may add to this or modify these functions):class

Tech_List

{

public:

Tech_List ();

~Tech_List();

void Add( Tech & to_add);

void Edit(charto_modify[]);

//only modifies the technology named

void Display_all();

void Display_benefit(char item_name[]

); /

/

display just the good

for 1 item

!

void Display_con(

char item_name[]

);

//display just the con for 1 item

Private:

//Put the information about the wish listof technology

//For this assignment, this should be a dynamically allocated array of

//tech items and an integer count

};

Make sure to use dynamically allocated arrays when we dont know the size at compile time!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions