What decimal number is represented by the binary 2’s complement 8-bit number 11100111? Show your work
In: Computer Science
Question: Write a method named reduce that:
● Takes a function of type (A, A) => A
● Returns A
● Combines all the elements of the list into a single value by
applying the provided function
to all elements
○ You may assume the function is commutative
● If the list has size 1, return that element without calling the
provided function
Example: If head stores a reference to the List(4, 6, 2)
head.reduce((a: Int, b: Int) => a + b) == 12
Programming language is Scala
In: Computer Science
Using Java:
Write a program that uses hash tables and reads in a string from the command line and a dictionary of words from standard input, and checks whether it is a "good" password. Here, assume "good" means that it (i) is at least 8 characters long, (ii) is not a word in the dictionary, (iii) is not a word in the dictionary followed by a digit 0-9 (e.g., hello5), (iv) is not two words separated by a digit (e.g., hello2world).
In: Computer Science
Suppose there are 4 processes P1, P2, P3 and P4 getting to ready queue in various arrival times and with various bursts times as detailed in the table below. Using Shortest-remaining-time-first scheduling approach, find waiting time for each process and the average waiting time and provide detailed steps taken to find the answer. Using time quantum of milliseconds.
Process |
Arrival time (ms) |
Burst Time (ms) |
P1 |
0 |
8 |
P2 |
2 |
3 |
P3 |
6 |
2 |
P4 |
9 |
7 |
In: Computer Science
create a new Python 3 Jupyter Notebook..
Create one python code cell for the problem below. Use any additional variables and comments as needed to program a solution to the corresponding problem. All functions should be defined at the top of the code in alphabetical order.
Problem:
Rubric:
In: Computer Science
Conduct an illustrated SWOT analysis of data consolidation versus data integration versus data propagation.
In: Computer Science
What is the 8-bit sum of the following 2’s complement numbers: 11101100+00001101? Show your work.
In: Computer Science
Either the iftcase macro in Emacs Lisp which can be used as follows :
(iftcase <exp>
((1 3 5) <exp1>)
((4) <exp2>)
(_ <exp3>))
Which will mean : first evaluate exp then evaluate exp1 if exp returns 1, 3, or 5; otherwise evaluate exp2 if exp returns 4; otherwise evaluate exp3
In: Computer Science
When you first receive a Request for Proposals (RFP), what three sections should you look at to determine if you are going to respond?
In: Computer Science
Python.Python.Python. Write a functional program over the automata that accepts odd length binary digits and rejects those that are not. It must include a function called q0 ,q1, accept and reject(). CANNOT USE STRING. OR LENTH.
101 accepted (3 binary digits)
10610 rejected (the number 6 is not a binary number)
101111 rejected (6 digit binary number)
11111 accepted (5 binary digits)
In: Computer Science
C++ programming
Instructions
Create a ShopCart class that allows you to add items to a shopping cart and get the total price of purchases made.
Items are simply described by an Item class as follows:
class Item {
public:
std :: String description;
float price;
};
The ShopCart class must be able to add and remove items and display an invoice. This class must use a dynamically allocated array of items whose capacity is fixed in advance to the build. The class must include the following methods:
• a constructor specifying the capacity of the cart;
• a copy constructor;
• an addsItem method allowing to add to the cart the item in argument (passage by reference). This method returns true if the addition was made and false if the basket is full;
• an removeItem method to remove the item for which the description is given (std :: String). It will return false if no item in the basket has a description corresponding to that given;
• an billInfo method to display the list of items purchased, their individual price and the total purchase price;
• a destroyer.
Your classes must be in the shop.h file, but all methods must have their definition in the shop.cpp file. You must also create a main function (contained in the dev1.cpp file) to test this class.
In: Computer Science
Saleem Application[1] Health is the most valuable possession for a human.Therefore, health must be cared about by all means. Good food, physical exercise and enough sleep are keys to good health. Another important factor is fitness. Fitness is a condition of being physically active. It is a result of general nutrition and proper conditioning, and it is a state of general physical and mental well-being. Doing regular physical activities can make you feel relieved about yourself and it can have several important points for your health. Imagine you and your team want to help in recruiting technologies to guide people to the most suitable way to improve their healthy lifestyle easily and effortlessly since it seems hard sometimes to continue going to the gym or to meet a nutrition specialist. The aim of the project is to develop an interactive mobile based application called "Saleem". It aims at enhancing individual's lifestyle quality in Saudi Arabia and the Middle East. It is an Arabic application that has many distinguished features that are not available in other similar applications. Saleem helps users in applying healthy habits in their lives. It provides the user with needed features to help in monitoring the number of calories needed, supporting exercise programs, and providing special diets. It also combines other features concerning the needed quantity of food and water to be consumed, and much more. The following summarizes notes describing the first version of the required features in the “Saleem” Android based application. A user must register/sign up by creating an account using his/her email, password, name, age, gender, height, weight, activity level, weight goal (lose, gain, maintain). This information will help the system in calculating relevant facts regarding users' physical health such as: the user’s Body Mass Index (BMI) and needed calories to consume/lose per day, etc. Once the user has signed up, he/she shall receive a verification email using the mail service system to complete their registration process. A registered user can access the system using his/her email and password. Once they are signed in they can add their meal manually to their daily intake by specifying in a form its ingredients, amount of each ingredient in grams and its measurement unit. After that, the system shall calculate the total calories of the meal. Also, users can add their meals by scanning the food item’s bar-code through their camera device. Moreover, the user can share his/her healthy recipes with other users by indicating their recipe name, recipe image, recipe category, recipe total calories, recipe ingredients and its amount, and recipe preparation steps. Furthermore, they can view recipes that were added by other users or search for a specific meal using the meal name and the system will display all meals that relate to the search. According to the search result, users may view meal information. Also, the system must allow users to report recipes that violate healthy diets, and add their daily amount of drunk water. Saleem’s has an Admin where he/she can access the system to delete a recipe that has been reported by any user. Finally, the system shall process requests and return results to users as quickly as possible. Also, new users shall learn how to use the system ASAP and all of their passwords need to be encrypted. [1]The general idea and content is based on the graduation project titled ‘Saleem Application’ which was supervised by L. Manal AlOnaizan during the 2019-2020 academic year. However, some changes have been done to suit the assignment.
please provide a use case diagram with 8 major use cases, one includes, and one extends relationship (including the extends and includes use cases.)
In: Computer Science
Sample input: Sample Output:
800-MATTRESS 800-628-8737 (leave off the last “S”)
800-mattress 800-628-8737 (leave off the last “S”)
Sample input: Sample Output:
8 8
0 0
0 0
M 6
A 2
T 8
T 8
R 7
E 3
S 7
(2) If they do not wish to convert a telephone letter pattern, the program should
terminate
(3) Valid values that the user can enter as to whether they wish to execute the
program are: ‘Y’ or ‘y’ or “N’ or ‘n’ .
(a) All other responses should error out and user the should be requested to
enter a valid response.
1 |
2: ABC |
3: DEF |
4: GHI |
5: JKL |
6: MNO |
7: PQRS |
8: TUV |
9: WXYZ |
* |
0 |
# |
A counter should keep track of how many telephone button conversions have been processed on and printed on the report.
A solid line of separators such as the **** or #### should be placed between each telephone button conversion done.
Place a good descriptive heading at the top of the report below the required first several output lines indicated at the top of this document.
At least three separate conversions should be processed.
D. Save the program with the name: Lab4tele.cpp
E. Test Data:
Test Case Number |
Phrase |
Output |
1 |
800-Compute |
? |
2 |
808-Science |
? |
3 |
888-Program |
? |
F. For this program, hand in:
PLEASE USE ANY LOOP(FOR, WHILE, DO). DO NOT USE STRINGS OR ARRAYS.
In: Computer Science
Why software process is important in Software Organization? How it is executed often and directly determines our costs or customer satisfaction? Give best cases or good examples in real time perspective?
In: Computer Science
You will make many purchases online in order to benefit from greater convenience or lower—prices, but you will likely set foot in a brickand mortar retail store at least occasionally, and you may have noticedsome changes brought by technology. A few decades ago, large retail chains started introducing computerized point-of-sale inventory systems consisting of checkout computers and an inventory control system. A simple bar code scancaptures a sale, and the item is automatically deducted from the store’s inventory, allowing real-time tracking of purchases so that the retailer knows when to reorder merchandise or restock shelves. In addition to a speedier checkout process, such systems help to reduce stockouts, increasing customer satisfaction. In many grocery stores, this system has been taken a step further, allowing the customers to conduct the checkout process themselves, saving time and labor costs. In Switzerland, grocery retailer Migros introduced a system that allows customers to scan items as they are placed into the shopping cart. At the checkout counter, all the customer has to do is swipe a credit card.
In the near future, many items may be equipped with radio frequency identification (RFID) tags (see Chapter 8), eliminating the need to scan each individual item, so that the total price for a cart full of merchandise can becalculated within a second, saving even more time and adding convenience for the customer. Imagine the time you’ll save when all you have to do is pass with your cart through an RFID reader and swipe your credit card.
Payment systems are also changing. A new “Pay by Fingerprint” system allows customers to complete a purchase by placing a finger onto a fingerprint scanner without the need to sign a sales slip or enter a personal identification number (PIN ); this makes the checkout process extremely convenient and secure. Another innovative way to pay for a purchase is via mobile phone. Using a technology called near-field communication (NFC; similar to Bluetooth), the customer’s mobile phone communicates with the retailer’s payment terminal, and the payment amount is automatically debited from the customer’s bank account. NFC-based payment systems have already begun to be implemented; major smartphone manufacturers such as Samsung, Nokia, Motorola, and HT C actively support this new technology by integrating it into new handsets.
Further, many brick-and-mortar retailers have had to respond to the phenomenon of showrooming, in which, as discussed earlier, customers examine products in person at a store and then leave to order the same product online for less. Retailers invest billions to build and maintain their storefronts, and online retailers can often undercut physical stores’ prices; when a customer takes advantage of this, the brick-andmortar retailer cannot recoup the cost of the storefront. Some retailers like Best Buy and Target are embracing this trend, however, by encouraging consumers to browse their shelves and compare prices online. By providing perks such as superior, personal customer service and instituting price-matching policies, these retailers prevent loss of customers due to price while benefiting by selling additional products. Other new and exciting in-store technologies include smart fitting rooms that use augmented reality technology to show how an item would look when worn or suggest complementary items. Finally, retail stores are increasingly using Bluetooth-enabled sales beacons to provide customers with real-time promotional offers.
As you can see, information systems have had a huge impact on retailing, and many more changes are yet to hit the shelves.
You may make many purchases online in order to benefit from greater convenience or lower prices, but you will likely set foot in a brick-and-mortar retail store at least occasionally, and you may have noticed some changes brought by technology. A few decades ago, large retail chains started introducing computerized point-of-sale inventory systems consisting of checkout computers and an inventory control system. A simple bar code scan captures a sale, and the item is automatically deducted from the store’s inventory, allowing real-time tracking of purchases so that the retailer knows when to reorder merchandise or restock shelves. In addition to a speedier checkout process, such systems help to reduce stockouts, increasing customer satisfaction. In many grocery stores, this system has been taken a step further, allowing the customers to conduct the checkout process themselves, saving time and labor costs. In Switzerland, grocery retailer Migros introduced a system that allows customers to scan items as they are placed into the shopping cart. At the checkout counter, all the customer has to do is swipe a credit card.
In the near future, many items may be equipped with radio frequency identification (RFID) tags (see Chapter 8), eliminating the need to scan each individual item, so that the total price for a cart full of merchandise can be calculated within a second, saving even more time and adding convenience for the customer. Imagine the time you’ll save when all you have to do is pass with your cart through an RFID reader and swipe your credit card.
Payment systems are also changing. A new “Pay by Fingerprint” system allows customers to complete a purchase by placing a finger onto a fingerprint scanner without the need to sign a sales slip or enter a personal identification number (PIN ); this makes the checkout process extremely convenient and secure. Another innovative way to pay for a purchase is via mobile phone. Using a technology called near-field communication (NFC; similar to Bluetooth), the customer’s mobile phone communicates with the retailer’s payment terminal, and the payment amount is automatically debited from the customer’s bank account. NFC-based payment systems have already begun to be implemented; major smartphone manufacturers such as Samsung, Nokia, Motorola, and HT C actively support this new technology by integrating it into new handsets.
Further, many brick-and-mortar retailers have had to respond to the phenomenon of showrooming, in which, as discussed earlier, customers examine products in person at a store and then leave to order the same product online for less. Retailers invest billions to build and maintain their storefronts, and online retailers can often undercut physical stores’ prices; when a customer takes advantage of this, the brick-andmortar retailer cannot recoup the cost of the storefront. Some retailers like Best Buy and Target are embracing this trend, however, by encouraging consumers to browse their shelves and compare prices online. By providing perks such as superior, personal customer service and instituting price-matching policies, these retailers prevent loss of customers due to price while benefiting by selling additional products. Other new and exciting in-store technologies include smart fitting rooms that use augmented reality technology to show how an item would look when worn or suggest complementary items. Finally, retail stores are increasingly using Bluetooth-enabled sales beacons to provide customers with real-time promotional offers.
As you can see, information systems have had a huge impact on retailing, and many more changes are yet to hit the shelves.
Help with an Introduction & Summary!!!!! Please!
In: Computer Science