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
Introduction: The Assignment requires the application of the Net Present Value (NPV) model to assess investment options given cost of capital, commonly referred to as discount rates, and required rates of returns. You will explain the role of a discount rate in evaluating the NPV model and compare investment options as cost of capital increases or decreases. The use of a financial calculator will be required in this Assignment.
The following course outcome is assessed in this Assignment:
MT480-4: Assess investment options based upon cost of capital and expected returns.
Read the scenario and address all of the checklist items.
Scenario: A new product manager presents to you, the Chief Financial Officer, a proposal to expand operations that includes the purchase of a new machine. The product manager is certain that the positive cash flows, which exceed the initial outlay by $20,000 by the end of year 4, will bring both praise and approval. You explain the company uses a 12% discount rate for cash flows and project related budgeting. You take the time to present the details of the Net Present Value (NPV) model used to assess product proposals. The data is below.
Project Outflows to Buy Machine
Day 1 Cash Out -$70,000 12% discount rate applied.
End Year 1 Cash Repayment $10,000
End Year 2 Cash Repayment $20,000
End Year 3 Cash Repayment $30,000
End Year 4 Cash Repayment $30,000
To educate the new manager, and as CFO, you take the time to evaluate the following:
Checklist:
In: Finance
Create the following tables for your project and calculate the NPV:
You are evaluating a project for ‘The Ultimate’ recreational tennis racket, guaranteed to correct a wimpy backhand. You estimate the sales price of ‘The Ultimate’ to be $400 and sales volume to be 1,000 units the 1st year, 1,250 units the 2ndyear and 1,325 units in year 3. The project has a 3-year life. Variable costs amount to $225 per unit and fixed costs are $100,000 per year. The project requires $165,000 of equipment that is depreciated using the 5-year MACRS schedule. The actual market value of the equipment at the end of year 3 is $35,000. Initial net working capital investment is $75,000 and NWC will maintain a level equal to 20% of sales for the first two years. There is no increase in year 3 of the project. The tax rate is 34% and the required return on the project is 10%.
What is the NPV of this project? (Show all your calculations)
In: Finance
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
Create Python Code using a "for" loop and a "while" loop. You are starting a twelve week program training to compete in a triathlon. The triathlon consists of three athletic events, 1.5 k swim, 40k bike, 10k run. In order to be prepared for the competition you want to print a training schedule. Starting with week 1 you will increase the distance of each activity so that you reach the race distance by week twelve. Due to rounding, you may be just under or over, and that’s okay. Display output to 2 decimal places. Since you want your program to be flexible, the program should the prompt for the athlete’s name and current level of each activity. Also allow the user to continue to enter training information for athletes until they say ‘no’ to the question “do you want to enter another”.
In: Computer Science
```please convert this code to make only using for loop not while loop
#include
#include
#define MAX_SIZE 500
int main()
{
char str[MAX_SIZE];
char tosearch[MAX_SIZE];
char part1[100];
char part2[100];
int cursor = 0, i, cnt1 = 0, cnt2 = 0, cnt = 0;
int j = 0;
int a = 0;
int b = 0;
int total = 0;
printf("Enter any string: ");
gets(str);
printf("Enter word to search occurrences: ");
gets(tosearch);
for (i = 0; i < strlen(tosearch); i++)
{
if (tosearch[i] == '*')
{
for (j = 0; j < i; j++)
{
part1[j] = tosearch[j];
}
a = j;
}
}
for (j = 0; j < strlen(tosearch) - a; j++)
{
part2[j] = tosearch[a + j + 1];
}
for (j = 0; j < a; j++)
{
printf("%c", part1[j]);
}
printf("\n");
for (j = 0; j < strlen(tosearch) - a - 1; j++)
{
printf("%c", part2[j]);
}
printf("\n");
b = strlen(part2);
while (cursor < strlen(str)) { // while the cursor is smaller
than length of main string while loop goes on
while (cnt1 != a) { // if the cnt1 is smaller than the part1
length the while loop goes on
if (str[cursor] == part1[0]) { // if the str[cursor] is correspond
to the first word of part1 go to for loop
for (i = 0; i < a; i++) {
if (str[cursor + i] == part1[i])
{
cnt1++; // count the number of matching letter of part1 and main
string
}
else { // else the cnt1 goes to 0 again and cursor goes
forward
cnt1 = 0;
cursor++;
break;
}
}
}
if (cursor > strlen(str) || cnt1 == a)
{
break;
}
cursor++; // cursor goes to the next letter
}
cursor += a; printf("the value of cursor %d ", cursor);
while (cnt2 != b) { // if cnt2 is less than the length of part2 the while loop goes on
if (str[cursor] == part2[0]) { // if the str[cursor] correspond
with part2[0] for loop goes on
for (i = 0; i < b; i++) {
if (str[cursor + i] == part2[i])
{
cnt2++; // count the matching letter of str and part2
}
else {
cnt2 = 0; // else cnt2 goes to 0 and cursor move on break free from
the for loop
cursor++;
break;
}
}
}
if (cursor > strlen(str) || cnt2 == b) // if the cursor is
larger than the strlen or cnt2 == (the length of part2) break
free
break;
cursor++; // move on to the next letter of the main string
}
if (cursor + b > strlen(str))
break;
cnt++;
cnt1 = 0;
cnt2 = 0;
}
printf("tot %d\n", cnt);
}
In: Computer Science
9- Matthew has a new job as business analyst. He plans to invest 10 percent of his annual salary after the tax into a retirement account at the end of every year for the next 30 years. Suppose that annual return of the investment is 6%, and his current salary before tax is 90k which grow 3% per year. The tax will apply as 15% on the salary up to 50k and it is 20% for the salary interval of 50k and 80k and the tax rate will be 25% for the remaining salary more than 80k (for example if his salary will be 105k, he is paying 15% tax on his first 50k and 20% in the next 30 k and 25% on his next 25k of his salary). then: a) Create a spreadsheet which shows Matthew the balance of retirement account for various levels of annual investments and returns. b) If Matthew aims to gain $1,000,000 at the end of the 30th year, what percentage of his salary he should put in the investment annually.
In: Computer Science
The concepts in this problem are similar to those in Multiple-Concept Example 4, except that the force doing the work in this problem is the tension in the cable. A rescue helicopter lifts a 76.8-kg person straight up by means of a cable. The person has an upward acceleration of 0.500 m/s2 and is lifted from rest through a distance of 8.64 m. (a) What is the tension in the cable? How much work is done by (b) the tension in the cable and (c) the person's weight? (d) Use the work-energy theorem and find the final speed of the person.
In: Physics
In: Psychology
Scenario
Consider the following quotation from The Wall Street Journal:
To U.S. farmers this year, a bountiful harvest is not something to rejoice over. So the news last week that the Agriculture Department is predicting a mammoth fall crop exceeding previous expectations was a shock to this farmland hamlet.
Instructions
Read the scenario and, respond to the following:
1.What is the economic problem?
2.Why would higher output levels diminish farm revenues?
3.What can we infer about the price elasticity of demand for agricultural products?
4.Do demand and supply come into play of the diminishing returns?
In: Psychology