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
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
A. Consider the following relations and relationship:
JobOpening (jobNo, positon, salary, requirement, contactPerson)
NewsPaper(newsPaperNo, name, street, city, zipCode, phoneNo)
Posting(jobNo, newsPaperNo, date, cost)
1. List all the positions that are posted on January 01, 2016
2. List all the positions that have never been posted
3. List the names of all the newspapers where the positions “database administrator has been posted
In: Computer Science
How do I start to code in mysql to Alter table to modify column
remove not null constraint
First drop the foreign key associated with
Drop the column
Add the column back with new definition
Add the foreign key back
This Is what I wrote so far
alter table employees modify column repotsTo remove null:
In: Computer Science
Python 3.7.4 (Introductory Level)
You want to know your grade in Computer Science:
Write a program that continuously takes grades between 0 and 100 to standard input until you input "stop", at which point it should print your average to standard output.
In: Computer Science
Separate code into .cpp and .h files:
// C++ program to create and implement Poly class representing
Polynomials
#include <iostream>
#include <cmath>
using namespace std;
class Poly
{
private:
int degree;
int *coefficients;
public:
Poly();
Poly(int coeff, int degree);
Poly(int coeff);
Poly(const Poly& p);
~Poly();
void resize(int new_degree);
void setCoefficient(int exp, int coeff);
int getCoefficient(int exp);
void display();
};
// default constructor to create a polynomial with constant
0
Poly::Poly()
{
// set degree to 0
degree = 0;
// create an array of size 1
coefficients = new int[degree+1];
coefficients[0] = 0;
}
// parameterized constructor to create a polynomial with degree
degree whose coefficient is coeff
Poly::Poly(int coeff, int degree)
{
this->degree = degree;
// create an array of size degree+1
coefficients = new int[degree+1];
// loop to set all the entries to 0
for(int i=0;i<degree;i++)
coefficients[i] = 0;
// set coefficient of degree to coeff
coefficients[degree] = coeff;
}
// parameterized constructor to create a polynomial with
constant coeff
Poly::Poly(int coeff)
{
// set degree to 0
degree = 0;
// create an array of size 1
coefficients = new int[degree+1];
// set coefficients of constant to coeff
coefficients[0] = coeff;
}
// copy constructor to create a Polynomial same as p
Poly::Poly(const Poly& p)
{
// set degree
degree = p.degree;
// create a new array of size degree+1
coefficients = new int[degree+1];
// loop to copy the coefficients
for(int i=0;i<=degree;i++)
coefficients[i] = p.coefficients[i];
}
// destructor to release the memory allocated
Poly::~Poly()
{
delete[] coefficients;
}
// function to resize the polynomial to new_degree if new_degree
> degree
void Poly:: resize(int new_degree)
{
if(new_degree > degree) // validate new_degree > degree
{
// create a new temporary array of size new_degree+1
int *temp = new int[new_degree+1];
// loop to copy coefficients to temp
for(int i=0;i<=degree;i++)
temp[i] = coefficients[i];
// loop to set the coefficients entries to 0
for(int i=degree+1; i<=new_degree; i++)
temp[i] = 0;
// release memory of existing array
delete[] coefficients;
// update degree
degree = new_degree;
// set coefficients to point to temp
coefficients = temp;
}
}
// function to set coefficient of exp to coeff
void Poly:: setCoefficient(int exp, int coeff)
{
// validate exp to be between [0,degree]
if(exp >= 0 && exp <= degree)
{
coefficients[exp] = coeff;
}
}
// function to return the coefficient of exp
int Poly::getCoefficient(int exp)
{
// validate exp to be between [0,degree]
if(exp >= 0 && exp <= degree)
return coefficients[exp];
return 0; // invalid exp, return 0
}
// function to display the polynomial
void Poly:: display()
{
bool firstTermDisplayed = false;
// loop from degree to 0
for(int i=degree; i>=0 ; i--)
{
if(coefficients[i] != 0) // ith coefficients is non-zero
{
if(firstTermDisplayed) // first term displayed
{
if(coefficients[i] > 0) // display sign between terms
cout<<" + ";
else
cout<<" - ";
cout<<abs(coefficients[i]); // display absolute value of
coefficient
}
else // first term being displayed
{
cout<<coefficients[i];
firstTermDisplayed = true; // set firstTermDisplayed to true
}
// display the power of x
if(i > 0)
{
if(i == 1)
cout<<"x";
else
cout<<"x^"<<i;
}
}
else if(i == 0 && !firstTermDisplayed) // if polynomial is
0, display the constant 0
cout<<coefficients[i];
}
}
int main()
{
// test the Poly class
Poly A(5, 7), B(2), X;
Poly C(A);
cout<<"A: ";
A.display();
cout<<endl<<"B: ";
B.display();
cout<<endl<<"X: ";
X.display();
cout<<endl<<"C: ";
C.display();
A.setCoefficient(0, -2);
A.setCoefficient(1, 10);
A.setCoefficient(3, -4);
cout<<endl<<"A: ";
A.display();
B.resize(5);
B.setCoefficient(2, 10);
cout<<endl<<"B: ";
B.display();
return 0;
}
//end of program
In: Computer Science
How is the first argument passed to a function in x86-64 assembly? Give an example of this happening in assembly and the corresponding C code.
What x86-64 register is changed to allocate local variables? Explain briefly with an example.
In: Computer Science
what are the four pillars of design And discuss them?
In: Computer Science
Program Specification: (Visual Studio C++)
1. Read data for names and weights for 15 people from the console
where there is a name on a line followed by a weight on the next
line.
2. Your program will build a list for the data maintained in
ascending order based on both name and weight via a doubly linked
list.
3. This dll will use one pointer to keep weights in sorted order,
and use the other link to keep names on sorted order.
4. You need to build the list as you go maintaining this ordering,
so at any time a print method was called it would print the related
field in order. (This means nodes are added to the list in sorted
order, elements are not added to the list followed by a sort called
on the list.)
For example after 3 elements are added for (Name –
Weight):
Michael – 275, Tom – 150, Abe – 200.
Output:
Names & weights sorted(ascending) by name. : Abe – 200, Michael
– 275, Tom - 150
Names & weights sorted(ascending) by weight. : Tom – 150, Abe –
200, Michael - 275
Jim
150
Tom
212
Michael
174
Abe
199
Richard
200
April
117
Claire
124
Bobby
109
Bob
156
Kevin
145
Jason
182
Brian
150
Chris
175
Steven
164
Annabelle
99
In: Computer Science
*C PROGRAMMING LANGUAGE*
a) Given an array of size n, sort the array using pointers using malloc or calloc. Examples: Input: n = 5, A= {33,21,2,55,4} Output: {2,4,21,33,55}
b) Write a function that declares an array of 256 doubles and initializes each element in the array to have a value equal to half of the index of that element. That is, the value at index 0 should be 0.0, the value at index 1 should be 0.5, the value at index 2 should be 1.0, and so on. your function must be called in the main. Also, declaring array and the size must be using heap.
In: Computer Science