Uncle Bob Knows Taking Computer Science Classes Wants Design Program Small Town Grocery St Q43877579

Uncle Bob knows that you have been taking computer scienceclasses and wants you to design a program for his small-towngrocery store. He doesn’t use bar codes and fancy equipment. Hejust wants to be able to input a cost for an item and whether ornot both the taxes are applied to it.

He wants the values to be stored so that they can be printed outlater. He has drawn up his idea of what he thinks his input andoutput should look like:

cost? 7.70tax? (y/n) ycost? 5.23tax? (y/n) ncost? 8.90tax? (y/n) ycost? 11.21tax? (y/n) ycost? 6.32tax? (y/n) nFor your review, here are your values: Cost Tax 7.70 0.77 5.23 0.00 8.90 0.89 11.21 1.12 6.32 0.00 —————— 39.36 2.78Your total bill is: 42.14

Your task is to implement Uncle Bob’s idea. To keep thingssimple, you can assume that each “customer” will have five items,and that the “teller” will never make a mistake typing. (O.K, theseare pretty unbelievable, but we are trying to keep it simple)

Write the code in c++.

Expert Answer


Answer to Uncle Bob knows that you have been taking computer science classes and wants you to design a program for his small-town …

Unic 1 Show Print Following Code First Input Enter 1 Hello World Without Quotation Marks S Q43889357

c++
UNIC 1. Show the print out of the following code when the first input (Enter 1) is Hello World without quotation marks andUNIC 1. Show the print out of the following code when the first input (“Enter 1”) is “Hello World without quotation marks and the second input (“Enter 2”) is the letter ‘el’) without quotation marks. (10 points) #include <iostream> #include <cstring> using namespace std; const int M=50; void y (char *s, char ch) char temp [M], *p; int i; ps; i=0; while (*p!=’ ‘) if (*p!=ch) temp[i]=*p; i++; else temp[i] = ‘X’; p++; temp[i]=’ ‘; strcpy(s, temp); int main() char str(M), let; cout<<“Enter 1:”; cin.getline (str,M); cout<<“Enter 2:”; cin>>let; y (str, let); cout<<str<<endl; return 0; Page 2 10 Show transcribed image text UNIC 1. Show the print out of the following code when the first input (“Enter 1”) is “Hello World without quotation marks and the second input (“Enter 2”) is the letter ‘el’) without quotation marks. (10 points) #include #include using namespace std; const int M=50; void y (char *s, char ch) char temp [M], *p; int i; ps; i=0; while (*p!=’ ‘) if (*p!=ch) temp[i]=*p; i++; else temp[i] = ‘X’; p++; temp[i]=’ ‘; strcpy(s, temp); int main() char str(M), let; cout

Expert Answer


Answer to UNIC 1. Show the print out of the following code when the first input (“Enter 1”) is “Hello World without quotation mark…

Unic 2 Explain One Two Sentences Following Program Eg Calculates Average Set Numbers Print Q43889276

c++
UNIC 2. Explain in one or two sentences, what the following program does (e.g. It calculates the average of a set of numbersUNIC 2. Explain in one or two sentences, what the following program does (e.g. “It calculates the average of a set of numbers”, “It prints a pyramid of a specific character where the character and the height of the pyramid are user defined”). (10 points) include <iostream> #include<fstream> using namespace std; int main () fstream f1,f2; char c; f1.open (“filel.txt”, ios::in); f2. open (“file2.txt”, ios::out) ; if (f1.fail ()) cout<<“Error!”<<endl; else c=f1.get (); while (c!=EOF) f2<<c; c=f1.get () ; fl.close (): f2.close (); return 0; …… ……… ..******. ……. 1…….. ………….. ….** Show transcribed image text UNIC 2. Explain in one or two sentences, what the following program does (e.g. “It calculates the average of a set of numbers”, “It prints a pyramid of a specific character where the character and the height of the pyramid are user defined”). (10 points) include #include using namespace std; int main () fstream f1,f2; char c; f1.open (“filel.txt”, ios::in); f2. open (“file2.txt”, ios::out) ; if (f1.fail ()) cout

Expert Answer


Answer to UNIC 2. Explain in one or two sentences, what the following program does (e.g. “It calculates the average of a set of nu…

Unic 3 Write Class Named Triangle Represent Triangle Class Contains Two Double Data Fields Q43889259

c++
UNIC 3. Write a class named Triangle to represent a Triangle. The class contains: • Two double data fields named base and heiUNIC 3. Write a class named Triangle to represent a Triangle. The class contains: • Two double data fields named base and height that specify the base and height of the triangle. • A constructor with no arguments that creates a triangle with width 3 and height 2. A constructor that creates a default triangle with the specified by the user width and height. • The accessor (get) and mutator (set) functions for all the data fields. • A function named getArea() that returns the area of this triangle. Write a test program that creates two Triangle objects. Assign base 4 and height 3 to the first object and base 5 and height 8 to the second. Display the properties of both objects and find their areas. (15 points) Show transcribed image text UNIC 3. Write a class named Triangle to represent a Triangle. The class contains: • Two double data fields named base and height that specify the base and height of the triangle. • A constructor with no arguments that creates a triangle with width 3 and height 2. A constructor that creates a default triangle with the specified by the user width and height. • The accessor (get) and mutator (set) functions for all the data fields. • A function named getArea() that returns the area of this triangle. Write a test program that creates two Triangle objects. Assign base 4 and height 3 to the first object and base 5 and height 8 to the second. Display the properties of both objects and find their areas. (15 points)

Expert Answer


Answer to UNIC 3. Write a class named Triangle to represent a Triangle. The class contains: • Two double data fields named base …

Unic 4 Following Program Adds Two Fractions Displays Result Sum Fraction Program Prompts U Q43889243

c++
UNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to inputUNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to input fraction 1 and fraction 2. There is a structure that has two members numerator, denominator and a function. There are some errors in the program (syntactic, logical, etc). Correct them by underlining the line where you think there is a mistake andre write that line in its correct form. There are 5 lines that have errors. include <iostream> using namespace std; stret Tract (15 points) int int deno Fract sum (Fract) int main() int numi, denol, num2, deno2 cout>”Enter fraction 11 numerator denominator cinnuml> denol cout<<“Enter fraction 2 inumerator denominatori” cin>>num2 >>deno2; Fract fl-numi, denol); /* 1/2 +/ Fract 2 num2, deno21/ 2/5 / Fract result – sum ti, 21//sum the fractions cout<<num<<“/”<<denoccendl; //display the result system/”pause”); return 0; Fract sum (Fract fl, Fract [2) Fract result-tf.num. 12.deno) + return result; f2.num. f1.deno), f1.deno 12.deno); Show transcribed image text UNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to input fraction 1 and fraction 2. There is a structure that has two members numerator, denominator and a function. There are some errors in the program (syntactic, logical, etc). Correct them by underlining the line where you think there is a mistake andre write that line in its correct form. There are 5 lines that have errors. include using namespace std; stret Tract (15 points) int int deno Fract sum (Fract) int main() int numi, denol, num2, deno2 cout>”Enter fraction 11 numerator denominator cinnuml> denol coutnum2 >>deno2; Fract fl-numi, denol); /* 1/2 +/ Fract 2 num2, deno21/ 2/5 / Fract result – sum ti, 21//sum the fractions cout

Expert Answer


Answer to UNIC 4. The following program adds two fractions and displays the result sum fraction. The program prompts the user to i…

Unic 6 Two Dimensional Array Suppose Indices Represent People Value Row Column Array True Q43889238

c++
UNIC 6. In a two dimensional array, suppose indices represent people and that the value at row column of a the array is TRUE(UNIC 6. In a two dimensional array, suppose indices represent people and that the value at row column of a the array is TRUE(1) In case i and jare friends and FALSE(0) otherwise. Initialize your array to represent the following configuration: 0 1 2 3 4 21 3 | . a) Write the code that counts how many pairs of friends are represented in the array. Note that each friendship pair appears twice in the array (0 and 1 are friends but als O are friends). So in the example above there are actually only 6 pairs of friends. b) Write a function to check whether two people have a common friend. For example, in the example above, 0 and 4 are both friends with 3 (so they have a common friend), whereas 1 and 2 have no common friends. The method should have three parameters: a 2D array of boolean representing the friendship relationships and two integers ij. The method should return true if there is a k such that i is a friend of k and k is a friend of and return false otherwise. Test this function in the main() program. (20 points) Show transcribed image text UNIC 6. In a two dimensional array, suppose indices represent people and that the value at row column of a the array is TRUE(1) In case i and jare friends and FALSE(0) otherwise. Initialize your array to represent the following configuration: 0 1 2 3 4 21 3 | . a) Write the code that counts how many pairs of friends are represented in the array. Note that each friendship pair appears twice in the array (0 and 1 are friends but als O are friends). So in the example above there are actually only 6 pairs of friends. b) Write a function to check whether two people have a common friend. For example, in the example above, 0 and 4 are both friends with 3 (so they have a common friend), whereas 1 and 2 have no common friends. The method should have three parameters: a 2D array of boolean representing the friendship relationships and two integers ij. The method should return true if there is a k such that i is a friend of k and k is a friend of and return false otherwise. Test this function in the main() program. (20 points)

Expert Answer


Answer to UNIC 6. In a two dimensional array, suppose indices represent people and that the value at row column of a the array is …

Unit 2 Discussion Topic 1 Topic 1 Security Emerging Technologies Newer Technologies Come N Q43841099

Unit 2 Discussion Topic 1 Topic 1: Security in Emerging Technologies With newer technologies come new security challenges. ItUnit 2 Discussion Topic 1 Topic 1: Security in Emerging Technologies With newer technologies come new security challenges. It is important for a consumer, organization, or government to understand the technology they use as to prevent cybersecurity pitfalls. Conduct research on products or services that use some variation of wireless technology like near field communications, WIFITM, Bluetooth®, or cellular. Do not forget embedded systems/smart sensors (loT) type products or services. Select one product or service from the research you conducted. Imagine it is your job to fully understand the technology in an effort to help prevent a cyber attack. If you could ask the manufacturer at least three questions, what would the questions be and why? Use literature to support your assertions, if applicable. Show transcribed image text Unit 2 Discussion Topic 1 Topic 1: Security in Emerging Technologies With newer technologies come new security challenges. It is important for a consumer, organization, or government to understand the technology they use as to prevent cybersecurity pitfalls. Conduct research on products or services that use some variation of wireless technology like near field communications, WIFITM, Bluetooth®, or cellular. Do not forget embedded systems/smart sensors (loT) type products or services. Select one product or service from the research you conducted. Imagine it is your job to fully understand the technology in an effort to help prevent a cyber attack. If you could ask the manufacturer at least three questions, what would the questions be and why? Use literature to support your assertions, if applicable.

Expert Answer


Answer to Unit 2 Discussion Topic 1 Topic 1: Security in Emerging Technologies With newer technologies come new security challenge…

Unit 2 Discussion Topic 2 Topic 2 Changing Threat Landscape Past Years Hacking Evolved Scr Q43841106

Unit 2 Discussion Topic 2 Topic 2: The Changing Threat Landscape Other the past few years, hacking has evolved from script kiUnit 2 Discussion Topic 2 Topic 2: The Changing Threat Landscape Other the past few years, hacking has evolved from script kiddies to specialized groups/organizations that have very focused goals. These organizations make use of sophisticated technologies, select specific targets, and then remain focused until they achieve their goals. This is called the Advanced Persistent Threat (APT). Pick an APT and describe the motivations behind the cyber threat. What tools or tactics are being used? Support your assertions with research. Show transcribed image text Unit 2 Discussion Topic 2 Topic 2: The Changing Threat Landscape Other the past few years, hacking has evolved from script kiddies to specialized groups/organizations that have very focused goals. These organizations make use of sophisticated technologies, select specific targets, and then remain focused until they achieve their goals. This is called the Advanced Persistent Threat (APT). Pick an APT and describe the motivations behind the cyber threat. What tools or tactics are being used? Support your assertions with research.

Expert Answer


Answer to Unit 2 Discussion Topic 2 Topic 2: The Changing Threat Landscape Other the past few years, hacking has evolved from scri…

Unit 4 Discussion Topic 1 V Topic 1 Enterprise Mobility Management Consider Business Secto Q43841118

Unit 4 Discussion Topic 1 v Topic 1: Enterprise Mobility Management Consider the business sector you chose from unit 1. The VUnit 4 Discussion Topic 1 v Topic 1: Enterprise Mobility Management Consider the business sector you chose from unit 1. The VP of Cybersecurity has asked you to conduct research on enterprise mobility management (EMM) systems as to protect your company from mobile cyber attacks. Conduct research on EMM’s and select one that would fit your company and explain why. Describe at least one cyber attack that has occurred recently in the last year) and why the EMM you selected is not vulnerable to it. Is your choice an on premise or on demand configuration? Explain why you chose that particular configuration for the EMM system you selected. Use literature to support your assertions, if applicable. Show transcribed image text Unit 4 Discussion Topic 1 v Topic 1: Enterprise Mobility Management Consider the business sector you chose from unit 1. The VP of Cybersecurity has asked you to conduct research on enterprise mobility management (EMM) systems as to protect your company from mobile cyber attacks. Conduct research on EMM’s and select one that would fit your company and explain why. Describe at least one cyber attack that has occurred recently in the last year) and why the EMM you selected is not vulnerable to it. Is your choice an on premise or on demand configuration? Explain why you chose that particular configuration for the EMM system you selected. Use literature to support your assertions, if applicable.

Expert Answer


Answer to Unit 4 Discussion Topic 1 v Topic 1: Enterprise Mobility Management Consider the business sector you chose from unit 1. …

Unit 4 Discussion Topic 2 Topic 2 Cybercrime Service Cloud Many Benefits Cloud Also Create Q43841125

Unit 4 Discussion Topic 2 Topic 2: Cybercrime as a Service The cloud has many benefits, but the cloud has also created many oUnit 4 Discussion Topic 2 Topic 2: Cybercrime as a Service The cloud has many benefits, but the cloud has also created many opportunities for cyber criminals. In addition, the nature of an attacker’s motives has changed due to the cloud. Cybercrime-as-a-Service is a service that cyber criminals can buy or rent. Typically the cyber criminal is buying or renting a botnet. Unfortunately, cyber crime has matured into a big business. What can be done or should be done about businesses that sell or rent botnets and the like? Start a New Thread Show transcribed image text Unit 4 Discussion Topic 2 Topic 2: Cybercrime as a Service The cloud has many benefits, but the cloud has also created many opportunities for cyber criminals. In addition, the nature of an attacker’s motives has changed due to the cloud. Cybercrime-as-a-Service is a service that cyber criminals can buy or rent. Typically the cyber criminal is buying or renting a botnet. Unfortunately, cyber crime has matured into a big business. What can be done or should be done about businesses that sell or rent botnets and the like? Start a New Thread

Expert Answer


Answer to Unit 4 Discussion Topic 2 Topic 2: Cybercrime as a Service The cloud has many benefits, but the cloud has also created m…