Complete a program in a class ToyCounter that computes the cost of toys sold in a shop. Five kinds of toys-Zen, Leo, Star, Sam, and Barry-are stocked and cost, respectively, RM0.75, RM0.50, RM1.25, RM0.80 and RM0.75 per toy. Create an array of strings that holds the names of these toys. Create another array that holds the cost of each corresponding toy. Your program should read the name of a toy and the quantity desired by a customer. Locate the toy in the name array and use that index to find the cost from the cost array. Compute and print the total cost of the sale as output in Figure 8 below:
Q: Computer scienceWhat kinds of tools and technologies are available to help with software testing?
A: Introduction: What kinds of tools and technologies are available to help with software testing? The…
Q: The sender sends the following message 1010110010 to the receiver. Using Vertical Redundancy Check,…
A: The answer for the given question is as follows.
Q: XYZ groups, want to ensure that remote staff can connect to the office network a. What server role…
A: Introduction A.VPN can be used by XYZ groups to ensure that remote employees can connect to the…
Q: Build the following function using only one 4x1 Mux: F(A,B,C,D) = E (0,4,5,6,8,10,12,13,15) NB: Your…
A: Here the number of variable is 4. For 4x1 MUX number of select lines is 2. So the input will be…
Q: Instructions • Develop a 9-puzzie (3 by 3) as shown in Fig.1 below, with the following features: 1.…
A: The Answer start from step-2.
Q: First create a Query "YourFirstName Customers without contact information" displaying Company Names…
A: Find the required query given as below :
Q: What exactly is an overlay network?Is it inclusive of routers? What are the overlay network's edges?
A: Introduction: Layered network: An overlay network is a logical computer network that is established…
Q: Computer science Is data visualisation just beneficial when dealing with large amounts of…
A: Introduction: A visualisation can transfer this information almost quickly, helping our brains to…
Q: Describe the most often used data concept in computer programming.
A: Introduction: we presuming you've inquired about the most popular data types used in computer…
Q: Please describe how Stack and Heap are utilized. Could you provide more information about the stack…
A: Foundation: When comparing stack memory with heap memory, the main distinction is that the stack is…
Q: How do the tools function to assess network vulnerabilities?
A: Introduction: In order to scan your application for new and existing threats, vulnerability…
Q: he CASE technique is often used in system dev
A: Benefits of adopting CASE in a development project: CASE tools can play an important part in…
Q: 4. The Fibonacci series: 0, 1, 1, 2,3,5,8,13,21... begins with terms 0 and 1 and has the property…
A: We present a code in C++ and java.
Q: Create table "STUDENT" with attributes "STUDENT_ID", "STUDENT_NAME", "STUDENT GPA". Use appropriate…
A: NOTE : There is a policy from bartleby to solve only first 3 subparts of a question.
Q: Explain the rendering and shading processes, as well as why they are necessary.
A: Computer Graphics: It is an art…
Q: Explain how information from an access log can be utilised to determine the true identity of an…
A: Introduction: In the control log, the impersonator noticed the following:
Q: Exercise 1.6.2: Finding a partition of a set. About Let sets A through F be defined as follows. • A=…
A:
Q: Provide me with the MATLAB code to swap the first and last row of the matrix given below, mat = 1111…
A: The Answer start from step-2.
Q: The following are some of the most major computer hardware advancements that you believe will take…
A: Hardware for computers: Writing letters, sending emails, organizing meetings, and communicating with…
Q: What is the difference between infrastructure and architecture when it comes to IT?
A: Justification: Architecture explains the design of the components and their interactions, while…
Q: What does the term "utilitization" mean in the context of networks?
A: Introduction: Utilization: The word "utilisation" literally means "the use of specific items."
Q: Describe enterprise storage systems, file servers, network attached storage, RAID systems,…
A: Introduction: Devices for Mass Storage: As the name implies, they are used to store a large amount…
Q: Project: Create a program that calculates the interest on a loan. This program should make it easy…
A: Step 1 : Start Step 2 : Define the function interest() which would calculate the interest with the…
Q: What does the term "hardware architecture" mean?
A: Hardware is a term used in computer science to refer to the equipment applications run. This is…
Q: he following is an old word puzzle: “Name a common word besides tremendous, stupendous, and…
A: # Python3 code for the above program class TrieNode(): def __init__(self): #…
Q: When a program requests input/output (I/O), what happens to the CPU? What method is utilized to…
A: Request for I/O: I/O requests for parcels are kernel mode structures that facilitate communication…
Q: what are Genetic and evolutionary algorithms ?
A: Below is the answer to above question. I hope this will be helpful for you..
Q: What are the various types of computer hardware available?
A: Computer: The computer is an electrical gadget that assists us in our daily lives. The computer is…
Q: We'll say that a String is ab-balanced if for all the 'a' chars in the string, there exists a 'b'…
A: Java program for above : import java.util.Scanner; class Prog{ public static void main…
Q: SOQL Assignment Salesforce: You have to write a SOQL query in which we have to find out all the 1000…
A: Use the Salesforce Object Query Language (SOQL) to search your organization’s Salesforce data for…
Q: Decode the number using the given private key. Decode the number M = 15 using the private key d = 53…
A: We are given, Private key d = 53 n = 77 And message M = 15 Let the decoded number be x. In RSA…
Q: Computational theory/ Chomsky normal form Q/ convert CFG context free grammar to Chomsky normal form…
A: Step1 Remove € productions They are no null (€) productions ___ Step 2 Remove unit productions…
Q: What methods can be used to impsove information poivacy
A: The answer is as follows:
Q: One advantage of compiling to bytecode rather than machine code is that it saves time.
A: Byte code is the intermediate code between the source code and machine code. The byte code is…
Q: What are the Linux/x86-64 System Calls?
A: Introduction: When a user launches a programme, it instructs the system to open, fork, read, and…
Q: List the item ID, description, and category for each pair of items that are in the same category.…
A: ANSWER:-
Q: Your function will need to correctly multiply the provided matrices and print out the resulting…
A: The complete C++ code is given below with screenshots
Q: What distinguishes the Oracle database from relational databases?
A: Oracle databases are collections of data that are handled as a single entity. A database is used to…
Q: What are your responsibilities as a Systems Analyst?
A: Introduction: The purpose of an information technology system analyst is to analyse and provide…
Q: This code is for c++ Write the Program for both the .h and the .cpp for the UML diagram Account…
A: Account.h code: #ifndef AccountH #define AccountH #include <iostream> using namespace std;…
Q: What are the three primary phases in the execution cycle of an instruction?
A: The following are the fundamental phases in the instruction execution cycle: The instruction cycle…
Q: If an untrusted network is connected to a firewall, what kind of connection does it typically have…
A: Untrusted networks: These are networks that can cause harm to the end system. user's The firewall is…
Q: What exactly is an IMSI, where may it be found, and what is it used for? How would a digital…
A: Introduction: The IMSI, wherever it may reside and whatever it is utilised for, is employed by…
Q: Public Key cryptography was created to overcome two major concerns, one of which being key…
A: Introduction: Public Key cryptography was created to overcome two major concerns, one of which being…
Q: What are the required technologies (hardware and software) that must be deployed in a customer…
A: Introduction: Processor: Processor: Processor: Processor: Processor: Processor: Processor: Processor…
Q: Explain in a paragraph or two how a virtual private network (VPN) ensures the security of data…
A: answer is
Q: Q1) on the simulator simulate the NFA that recognizes the language Af. The language 1 (001*)* with…
A: We have to draw a NFA with only 3 states for given language : 1* (001+)* I have provided the NFA on…
Q: 1. Ifu= 4, v = 5, w = 6, x = 8, and y = 12, what is the value of each of the following expressions,…
A: a) u / y % v + w * x --> 4/12 % 5 + 6*8 --> 0%5 + 48 --> 0+48 --> 48 So the value of…
Q: What is the process by which local declarations are placed in computer memory? There are valid…
A: Memory Allocation: The technique by which the software creates "space" for the capacity of…
Q: Recast the following computational problems as decision problems. a. Sorting
A: a. Sorting Sorting is the process of ordering or arranging a given collection of elements in some…
Step by step
Solved in 2 steps
- 1) Create a array of Fahrenheit temperatures, as follows int fahr []= {0,1,2,3,4,5,6,7,8,9,10,32,33,34,35,36,37,38,39,40}; 2) create a function convert(int fahr) that converts Fahr to Cels, such as you did in class, outside of main(), above it. 3) create a loop, that prints side by side Fahrenheit temperatures from the array above (in a similar way how you printed an array in class) and Celsius temperature by calling function convert(...) in the loop to get a matching Celsius temperature for each Fahrenheit temperature that you print. Do you program in C++ compiler online. Compile it step by step, making sure your code does not have syntax errors as you add new contents.an int variable k, an int array currentMembers that has been declared and initialized, an int variable nMembers that contains the number of elements in the array, an int variable memberID that has been initialized, and a bool variable isAMember, Write code that assigns true to isAMember if the value of memberID can be found in currentMembers, and that assigns false to isAMemberotherwise. Use only k, currentMembers, nMembers, and isAMember.The bank will store a record for each account consisting of a customer number (an integer) representing the owner of the account, an account type (a single char: C for chequing, S for savings, and M for mutual fund), and the balance of the account (a double). These are kept in three arrays-an array of customer numbers, an array of types, and an array of balances. A sample of what this might look like appears below: Customer Array 102241 992944 992944 Type Array C S C Balance Array 1.29 22.50 1.24 The entries in the array correspond to one another-for example, the first slot in all three arrays represent the fact that customer number 102241 has a chequing account with $1.29 in it. As is shown, the same customer number can appear several times, as customers can have more than one account. These are called parallel arrays, because the slots in each correspond, and the really important thing about parallel arrays is that if you shuffle around anything in one array, you have to…
- The bank will store a record for each account consisting of a customer number (an integer) representing the owner of the account, an account type (a single char: C for chequing, S for savings, and M for mutual fund), and the balance of the account (a double). These are kept in three arrays-an array of customer numbers, an array of types, and an array of balances. A sample of what this might look like appears below: Customer Array 102241 992944 992944 Type Array C S C Balance Array 1.29 22.50 1.24 The entries in the array correspond to one another-for example, the first slot in all three arrays represent the fact that customer number 102241 has a chequing account with $1.29 in it. As is shown, the same customer number can appear several times, as customers can have more than one account. These are called parallel arrays, because the slots in each correspond, and the really important thing about parallel arrays is that if you shuffle around anything in one array, you have to…6.19 LAB: Word frequencies - methods Define a method named getWordFrequency that takes an array of strings, the size of the array, and a search word as parameters. Method getWordFrequency() then returns the number of occurrences of the search word in the array parameter (case insensitive). Then, write a main program that reads a list of words into an array, calls method getWordFrequency() repeatedly, and outputs the words in the arrays with their frequencies. The input begins with an integer indicating the number of words that follow. Assume that the list will always contain less than 20 words.4. Write a Python program that inputs integers until a 0 is encountered and then prints the maximum value entered up to that point.5. Write a Python function that inputs an array of integers and returns the maximum value in this array. Do not use the max method on array class
- Exercise1: Write a program that stores data for 5 students in two different arrays as follows: Name: take student’s names from the console (using Scanner object) then store their names in an array of a String data type GPA: : take student’s GPA from the console (using the same Scanner object) then store their GPAs in an array of a double data type. Exercise 5: Write a program the calculates the maximum number in an array of 10 integers. The input should be taken from the console (using a Scanner object).c++ Write a program that declares an array of 15 integers and reads the values from the user. Make sure that the user doesn’t enter a value greater than 10 (if the user enters a value not in the allowed range, discard that value and read another to put into the array). Now tell the number that occur maximum number of times in the array. For example for the following 7 has maximum occurrence. 4,7,3,3,2,7,1,5,7,9,9,9,7,8,10 Use both linear and binary search.The following code creates a small phone book. An array is used to storea list of names and another array is used to store the phone numbers thatgo with each name. For example, Michael Myers’ phone number is 333-8000 and Ash Williams’ phone number is 333-2323. Write the functionlookupName so the code properly looks up and returns the phone numberfor the input target name.int main(){using namespace std;string names[] = {"Michael Myers","Ash Williams","Jack Torrance","Freddy Krueger"};string phoneNumbers[] = {"333-8000","333-2323","333-6150","339-7970"};string targetName, targetPhone;char c;do{cout << "Enter a name to find the "<< "corresponding phone number."<< endl;getline(cin, targetName);targetPhone = lookupName(targetName,names, phoneNumbers,4);if (targetPhone.length() > 0)cout << "The number is: "<< targetPhone << endl;elsecout << "Name not found. "<< endl;cout << "Look up another name? (y/n)"<< endl;cin >>…
- In java Develop a function that accepts an array and returns true if the array contains any duplicate values or false if none of the values are repeated. Develop a function that returns true if the elements are in decreasing order and false otherwise. A “peak” is a value in an array that is preceded and followed by a strictly lower value. For example, in the array {2, 12, 9, 8, 5, 7, 3, 9} the values 12 and 7 are peaks. Develop a function that returns the number of peaks in an array of integers. Note that the first element does not have a preceding element and the last element is not followed by anything, so neither the first nor last elements can be peaks. Develop a function that finds the starting index of the longest subsequence of values that is strictly increasing. For example, given the array {12, 3, 7, 5, 9, 8, 1, 4, 6}, the function would return 6, since the subsequence {1, 4, 6} is the longest that is strictly increasing. Develop a function that takes a string…Write two overloaded functions that return the sum of values at even locations of an array with the following headers:int sumOfEven(const int* array, int size);double sumOfEven(const double* array, int size);Write a test program that reads five integers or double values, invokes this function, and displays the sum of values at even locations.Computer Science I am having some problems generating a random sphere coordinates of n points using Python. The first class's parameter is (radius (r) and number of points (n)) this class returns an array of spherical coordinates with size (3, n), where the 3 rows are ordered as (radial distances, polar angles, azimuthal angles) The second class's parameter is the array given above, this class convert the above coordinates to Catesian coordinates, and returns an array of size (4, n), where the 4 rows are ordered as (x, y, z, 1)