Homework Help for Information Technology

1,532 results

IT encompasses the study, use, and service of coputers and communication systems for storing, sending, receiving and manipulation data and information

For unlimited access to Homework Help, a Homework+ subscription is required.

Avatar image
aakashkushwaha8767 answered this question
Lv1
in Information Technology·
23 Mar 2023

Hi. Was I supose to add the last code to the first? The output also show only this:

 

#include <stdio.h>

// Define the encryption methods for each item category int encrypt_method[] = {1, 2, 1, 3, 3, 5, 5, 5, 6, 7, 7, 4};

// Define the durable life period for each item category in days int life_period[] = {20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130};

// Define the sale promotion percentage for each item category int promotion[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

// Define the regular price for each item category float regular_price[] = {12.50, 10.20, 8.75, 6.99, 18.99, 15.55, 11.79, 9.99, 7.25, 5.49, 13.99, 23.99};

// Define the items bought by the customer int bought_items[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};

// Define the items returned by the customer int returned_items[] = {3, 7, 11};

int main() {
    char barcode[20]; 
    int i, j; 
    float price, sale_price, total_price = 0.0;

    // Generate barcodes for each item and print the receipt
    printf("Receipt:\n");

    for (i = 0; i < 12; i++) {
        // Encrypt the barcode using the appropriate encryption method
        switch (encrypt_method[i]) {
        case 1:
            sprintf(barcode, "ABC%d", bought_items[i]);
            break;
        case 2:
            sprintf(barcode, "DEF%d", bought_items[i]);
            break;
        case 3:
            sprintf(barcode, "GHI%d", bought_items[i]);
            break;
        case 4:
            sprintf(barcode, "JKL%d", bought_items[i]);
            break;
        case 5:
            sprintf(barcode, "MNO%d", bought_items[i]);
            break;
        case 6:
            sprintf(barcode, "PQR%d", bought_items[i]);
            break;
        case 7:
            sprintf(barcode, "STU%d", bought_items[i]);
            break;
        default:
            sprintf(barcode, "VWX%d", bought_items[i]);
            break;
        }

        // Calculate the price of the item, including any promotions
        price = regular_price[i];
        if (promotion[i] > 0) {
            sale_price = price * (1.0 - (float)promotion[i] / 100.0);
            price = sale_price;
        }

        // Check if the item was returned and adjust the total price accordingly
        for (j = 0; j < 3; j++) {
            if (returned_items[j] == bought_items[i]) {
                price = 0.0;
            }
        }

        // Print the item details and update the total price
        printf("%s - $%.2f\n", barcode, price);
        total_price += price;
    }

    // Print the total price of the items bought
    printf("Total price: $%.2f\n", total_price);

    return

Avatar image
aakashkushwaha8767 answered this question
Lv1
in Information Technology·
23 Mar 2023

Hi again.

Code has error at bottom also is missing Your application is responsible to use encryption method 1 for #1, and #3. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 2 for #2. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 3 for #4, and #5. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 4 for #6. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 5 for #7, #8, and #9. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 6 for #10. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 7 for #11. (You have to define the suitable encryption method.)


The output of the encryptions will generate a number that will be known as the barcode of that specific item in this store.

Before selecting and implementing your encryption methods, you have to answer the following questions:

- Will all the generated barcodes have the same number of digits?

- How should we deal with barcodes that have different numbers of digits?

- Do you need to define decryption?

- Is there any other questions, aspects, complications, simplifications, etc. that I need to think about in advance?

Items will go on sale on different dates depending on their categories.

Group A, B, C, and D follow the following rules:

- Items will go on a 10% promotion when the date passes 50% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 65% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 75% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group E, F, G, and H follow the following rules:

- Items will go on a 10% promotion when the date passes 60% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 70% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 80% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory


Groups I, J, and K follow the following rules:

- Items will go on a 10% promotion when the date passes 40% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 50% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 60% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group L follows the following rules:

- Items will go on a 10% promotion when the date passes 70% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 80% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 90% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

The output of your program will be a printed receipt that shows a list of 12 items (one item from each category), 8 items with the regular price, and 4 items on sale that a customer bought also the customer has 3 items to return from three different categories.
 


Error after \n",  


    // print the barcode
    printf("Barcode: %s\n", barcode); error ,barcode?


Avatar image
aakashkushwaha8767 answered this question
Lv1
in Information Technology·
23 Mar 2023

Hi again. Heres what instruction I have. This is the task, to turn what Iv provided into a C program code. Thx.

 

In this activity, you are designing an application for grocery stores and their inventories.

The items depending on their type are divided into the following categories:

Group A: Meat

Group B: Deli

Group C: Pharmacy

Group D: Seafood

Group E: Beverage

Group F: Canned

Group G: Jarred

Group H: Dry Food

Group I: Dairy

Group J: Bakery

Group K: Personal Care

Group L: Paper Goods

Your store must have at least 3 items in each category.

Your application as the first step needs to collect the following information before importing the items to the store:

1. The name of the product

2. The Category

3. The Company/Manufacturer name

4. The purchased price (What company has paid to buy this product)

5. The sale price (What customers will pay to buy this product)

6. The quantity of the purchased items

7. The date of the purchased items

8. The date of the production

9. The expiry date of the product

10. Store Code (a 4-digit number)

11. The currency of the country


12. Items will go on sale on different dates depending on their categories.

Your application is responsible to use encryption method 1 for #1, and #3. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 2 for #2. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 3 for #4, and #5. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 4 for #6. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 5 for #7, #8, and #9. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 6 for #10. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 7 for #11. (You have to define the suitable encryption method.)


The output of the encryptions will generate a number that will be known as the barcode of that specific item in this store.

Before selecting and implementing your encryption methods, you have to answer the following questions:

- Will all the generated barcodes have the same number of digits?

- How should we deal with barcodes that have different numbers of digits?

- Do you need to define decryption?

- Is there any other questions, aspects, complications, simplifications, etc. that I need to think about in advance?

Items will go on sale on different dates depending on their categories.

Group A, B, C, and D follow the following rules:

- Items will go on a 10% promotion when the date passes 50% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 65% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 75% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group E, F, G, and H follow the following rules:

- Items will go on a 10% promotion when the date passes 60% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 70% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 80% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory


Groups I, J, and K follow the following rules:

- Items will go on a 10% promotion when the date passes 40% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 50% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 60% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group L follows the following rules:

- Items will go on a 10% promotion when the date passes 70% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 80% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 90% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

The output of your program will be a printed receipt that shows a list of 12 items (one item from each category), 8 items with the regular price, and 4 items on sale that a customer bought also the customer has 3 items to return from three different categories.

A receipt needs to include the following information on it:

- The price of each item that has a regular price

- If the price is reduced the reduction amount and sales percentage will be printed on the lines below the regular price; therefore the customer will see the regular price, the sales price, the reduced amount, and the sales percentage

- Each item has a unique barcode
- The date of the purchase
- The store number along with the address of the store
- The final Balance
- The payment method


As per our discussion in class, your code needs to ask the following question from the user at the very beginning:
"Would you like to import any item to your store?"
The answer to this question is YES/NO.
If YES, there will be 12 steps to collect the information related to that specific item being imported to the store to fill in and then, the program will proceed with the following steps.
If No, 30 items (3*10, 3 items in each category) have already existed in our store and the program will proceed with the following steps.

Memory management, allocating, and deallocating memory is one of the most important aspects to be considered in this project.

Lv1
in Information Technology·
23 Mar 2023

Hello. Please complete the assignment below. Im in need of a complete C program code i can run in visual studio code. My vs code compiler is basic so please wright code as such.  The instruction does not explain encryption method type just what it reads. Thx.

 

n this activity, you are designing an application for grocery stores and their inventories.

The items depending on their type are divided into the following categories:

Group A: Meat

Group B: Deli

Group C: Pharmacy

Group D: Seafood

Group E: Beverage

Group F: Canned

Group G: Jarred

Group H: Dry Food

Group I: Dairy

Group J: Bakery

Group K: Personal Care

Group L: Paper Goods

Your store must have at least 3 items in each category.

Your application as the first step needs to collect the following information before importing the items to the store:

1. The name of the product

2. The Category

3. The Company/Manufacturer name

4. The purchased price (What company has paid to buy this product)

5. The sale price (What customers will pay to buy this product)

6. The quantity of the purchased items

7. The date of the purchased items

8. The date of the production

9. The expiry date of the product

10. Store Code (a 4-digit number)

11. The currency of the country


12. Items will go on sale on different dates depending on their categories.

Your application is responsible to use encryption method 1 for #1, and #3. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 2 for #2. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 3 for #4, and #5. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 4 for #6. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 5 for #7, #8, and #9. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 6 for #10. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 7 for #11. (You have to define the suitable encryption method.)


The output of the encryptions will generate a number that will be known as the barcode of that specific item in this store.

Before selecting and implementing your encryption methods, you have to answer the following questions:

- Will all the generated barcodes have the same number of digits?

- How should we deal with barcodes that have different numbers of digits?

- Do you need to define decryption?

- Is there any other questions, aspects, complications, simplifications, etc. that I need to think about in advance?

Items will go on sale on different dates depending on their categories.

Group A, B, C, and D follow the following rules:

- Items will go on a 10% promotion when the date passes 50% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 65% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 75% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group E, F, G, and H follow the following rules:

- Items will go on a 10% promotion when the date passes 60% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 70% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 80% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory


Groups I, J, and K follow the following rules:

- Items will go on a 10% promotion when the date passes 40% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 50% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 60% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group L follows the following rules:

- Items will go on a 10% promotion when the date passes 70% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 80% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 90% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

The output of your program will be a printed receipt that shows a list of 12 items (one item from each category), 8 items with the regular price, and 4 items on sale that a customer bought also the customer has 3 items to return from three different categories.

A receipt needs to include the following information on it:

- The price of each item that has a regular price

- If the price is reduced the reduction amount and sales percentage will be printed on the lines below the regular price; therefore the customer will see the regular price, the sales price, the reduced amount, and the sales percentage

- Each item has a unique barcode
- The date of the purchase
- The store number along with the address of the store
- The final Balance
- The payment method


As per our discussion in class, your code needs to ask the following question from the user at the very beginning:
"Would you like to import any item to your store?"
The answer to this question is YES/NO.
If YES, there will be 12 steps to collect the information related to that specific item being imported to the store to fill in and then, the program will proceed with the following steps.
If No, 30 items (3*10, 3 items in each category) have already existed in our store and the program will proceed with the following steps.

Memory management, allocating, and deallocating memory is one of the most important aspects to be considered in this project.

Lv1
in Information Technology·
23 Mar 2023

Hello. 

Not givin instruction other than what you read in the question. You have to define the suitable encryption method.heres the code I have so far but I need a working main int.

thx.

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <time.h>



// Define the maximum length of a string.

#define MAX_LENGTH 100



// Define the number of items in each category.

#define NUM_MEAT 2

#define NUM_DELI 2

#define NUM_PHARMACY 2

#define NUM_SEAFOOD 2

#define NUM_BEVERAGE 2

#define NUM_CANNED 2

#define NUM_JARRED 2

#define NUM_DRY_FOOD 2

#define NUM_DAIRY 2

#define NUM_BAKERY 2

#define NUM_PERSONAL_CARE 2

#define NUM_PAPER_GOODS 2



// Define the number of categories.

#define NUM_CATEGORIES 12



// Define the durable life period of each category.

#define DURABLE_LIFE_PERIOD_MEAT 5

#define DURABLE_LIFE_PERIOD_DELI 4

#define DURABLE_LIFE_PERIOD_PHARMACY 2

#define DURABLE_LIFE_PERIOD_SEAFOOD 3

#define DURABLE_LIFE_PERIOD_BEVERAGE 6

#define DURABLE_LIFE_PERIOD_CANNED 8

#define DURABLE_LIFE_PERIOD_JARRED 10

#define DURABLE_LIFE_PERIOD_DRY_FOOD 12

#define DURABLE_LIFE_PERIOD_DAIRY 7

#define DURABLE_LIFE_PERIOD_BAKERY 2

#define DURABLE_LIFE_PERIOD_PERSONAL_CARE 9

#define DURABLE_LIFE_PERIOD_PAPER_GOODS 14



// Define the encryption key for encryption method 1.

#define ENCRYPTION_KEY_1 "zyxwvutsrqponmlkjihgfedcba"



// Define the encryption key for encryption method 2.

#define ENCRYPTION_KEY_2 "nopqrstuvwxyzabcdefghijklm"



// Define the encryption key for encryption method 3.

#define ENCRYPTION_KEY_3 "plmoknijbuhvygctfxrdzeswaq"



// Define the encryption key for encryption method 5.

#define ENCRYPTION_KEY_5 "abcdefghijklmnopqrstuvwyxz"



// Define the encryption key for encryption method 6.

#define ENCRYPTION_KEY_6 "0123456789"



// Define the encryption key for encryption method 7.

#define ENCRYPTION_KEY_7 "USD"



// Define the number of digits for the barcode.

#define BARCODE_LENGTH 10



// Define the number of items in the store.

#define NUM_ITEMS (NUM_MEAT + NUM_DELI + NUM_PHARMACY + NUM_SEAFOOD + NUM_BEVERAGE + NUM_CANNED + NUM_JARRED + NUM_DRY_FOOD + NUM_DAIRY + NUM_BAKERY + NUM_PERSONAL_CARE + NUM_PAPER_GOODS)



// Define the struct for an item.

struct Item {

    char name[MAX_LENGTH];

    char category[MAX_LENGTH];

    char company[MAX_LENGTH];

    double purchased_price;

    double sale_price;

    int quantity;

    char date_purchased[MAX_LENGTH];

    char date_production[MAX_LENGTH];

    char expiry_date[MAX_LENGTH];

    int store_code;

    char currency[MAX_LENGTH];

    char barcode[BARCODE_LENGTH + 1];

};

int main() {

   

}

 

Lv1
in Information Technology·
23 Mar 2023

Can someone please help me with this code. I struggling to write the Int main() at bottom so the code will run the correct output and error free.

Thnak you for your help!

 

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <time.h>



// Define the maximum length of a string.

#define MAX_LENGTH 100



// Define the number of items in each category.

#define NUM_MEAT 2

#define NUM_DELI 2

#define NUM_PHARMACY 2

#define NUM_SEAFOOD 2

#define NUM_BEVERAGE 2

#define NUM_CANNED 2

#define NUM_JARRED 2

#define NUM_DRY_FOOD 2

#define NUM_DAIRY 2

#define NUM_BAKERY 2

#define NUM_PERSONAL_CARE 2

#define NUM_PAPER_GOODS 2



// Define the number of categories.

#define NUM_CATEGORIES 12



// Define the durable life period of each category.

#define DURABLE_LIFE_PERIOD_MEAT 5

#define DURABLE_LIFE_PERIOD_DELI 4

#define DURABLE_LIFE_PERIOD_PHARMACY 2

#define DURABLE_LIFE_PERIOD_SEAFOOD 3

#define DURABLE_LIFE_PERIOD_BEVERAGE 6

#define DURABLE_LIFE_PERIOD_CANNED 8

#define DURABLE_LIFE_PERIOD_JARRED 10

#define DURABLE_LIFE_PERIOD_DRY_FOOD 12

#define DURABLE_LIFE_PERIOD_DAIRY 7

#define DURABLE_LIFE_PERIOD_BAKERY 2

#define DURABLE_LIFE_PERIOD_PERSONAL_CARE 9

#define DURABLE_LIFE_PERIOD_PAPER_GOODS 14



// Define the encryption key for encryption method 1.

#define ENCRYPTION_KEY_1 "zyxwvutsrqponmlkjihgfedcba"



// Define the encryption key for encryption method 2.

#define ENCRYPTION_KEY_2 "nopqrstuvwxyzabcdefghijklm"



// Define the encryption key for encryption method 3.

#define ENCRYPTION_KEY_3 "plmoknijbuhvygctfxrdzeswaq"



// Define the encryption key for encryption method 5.

#define ENCRYPTION_KEY_5 "abcdefghijklmnopqrstuvwyxz"



// Define the encryption key for encryption method 6.

#define ENCRYPTION_KEY_6 "0123456789"



// Define the encryption key for encryption method 7.

#define ENCRYPTION_KEY_7 "USD"



// Define the number of digits for the barcode.

#define BARCODE_LENGTH 10



// Define the number of items in the store.

#define NUM_ITEMS (NUM_MEAT + NUM_DELI + NUM_PHARMACY + NUM_SEAFOOD + NUM_BEVERAGE + NUM_CANNED + NUM_JARRED + NUM_DRY_FOOD + NUM_DAIRY + NUM_BAKERY + NUM_PERSONAL_CARE + NUM_PAPER_GOODS)



// Define the struct for an item.

struct Item {

    char name[MAX_LENGTH];

    char category[MAX_LENGTH];

    char company[MAX_LENGTH];

    double purchased_price;

    double sale_price;

    int quantity;

    char date_purchased[MAX_LENGTH];

    char date_production[MAX_LENGTH];

    char expiry_date[MAX_LENGTH];

    int store_code;

    char currency[MAX_LENGTH];

    char barcode[BARCODE_LENGTH + 1];

};

int main() {

   

}

Lv1
in Information Technology·
23 Mar 2023

Hello. This is a C program language code im needing and i use vs code compiler. Im needing a writen code in C program.  Please make sure encryption methods are added. Thx.

In this activity, you are designing an application for grocery stores and their inventories.

The items depending on their type are divided into the following categories:

Group A: Meat

Group B: Deli

Group C: Pharmacy

Group D: Seafood

Group E: Beverage

Group F: Canned

Group G: Jarred

Group H: Dry Food

Group I: Dairy

Group J: Bakery

Group K: Personal Care

Group L: Paper Goods

Your store must have at two items in each category.

Your application as the first step needs to collect the following information before importing the items to the store:

1. The name of the product

2. The Category

3. The Company/Manufacturer name

4. The purchased price (What company has paid to buy this product)

5. The sale price (What customers will pay to buy this product)

6. The quantity of the purchased items

7. The date of the purchased items

8. The date of the production

9. The expiry date of the product

10. Store Code (a 4-digit number)

11. The currency of the country


12. Items will go on sale on different dates depending on their categories.

Your application is responsible to use encryption method 1 for #1, and #3. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 2 for #2. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 3 for #4, and #5. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 4 for #6. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 5 for #7, #8, and #9. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 6 for #10. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 7 for #11. (You have to define the suitable encryption method.)


The output of the encryptions will generate a number that will be known as the barcode of that specific item in this store.

Before selecting and implementing your encryption methods, you have to answer the following questions:

- Will all the generated barcodes have the same number of digits?

- How should we deal with barcodes that have different numbers of digits?

- Do you need to define decryption?

- Is there any other questions, aspects, complications, simplifications, etc. that I need to think about in advance?

Items will go on sale on different dates depending on their categories.

Group A, B, C, and D follow the following rules:

- Items will go on a 10% promotion when the date passes 50% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 65% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 75% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group E, F, G, and H follow the following rules:

- Items will go on a 10% promotion when the date passes 60% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 70% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 80% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory


Groups I, J, and K follow the following rules:

- Items will go on a 10% promotion when the date passes 40% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 50% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 60% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group L follows the following rules:

- Items will go on a 10% promotion when the date passes 70% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 80% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 90% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

The output of your program will be a printed receipt that shows a list of 12 items (one item from each category), 8 items with the regular price, and 4 items on sale that a customer bought also the customer has 3 items to return from three different categories.

A receipt needs to include the following information on it:

- The price of each item that has a regular price

- If the price is reduced the reduction amount and sales percentage will be printed on the lines below the regular price; therefore the customer will see the regular price, the sales price, the reduced amount, and the sales percentage

- Each item has a unique barcode
- The date of the purchase
- The store number along with the address of the store
- The final Balance
- The payment method

Avatar image
shivamrajbhar950 answered this question
Lv1
in Information Technology·
23 Mar 2023

hHi again. I revoved the errors but now am recieving new errors? I took a snapshot below code. Thx again.

 

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <time.h>



// Define the maximum length of a string.

#define MAX_LENGTH 100



// Define the number of items in each category.

#define NUM_MEAT 2

#define NUM_DELI 2

#define NUM_PHARMACY 2

#define NUM_SEAFOOD 2

#define NUM_BEVERAGE 2

#define NUM_CANNED 2

#define NUM_JARRED 2

#define NUM_DRY_FOOD 2

#define NUM_DAIRY 2

#define NUM_BAKERY 2

#define NUM_PERSONAL_CARE 2

#define NUM_PAPER_GOODS 2



// Define the number of categories.

#define NUM_CATEGORIES 12



// Define the durable life period of each category.

#define DURABLE_LIFE_PERIOD_MEAT 5

#define DURABLE_LIFE_PERIOD_DELI 4

#define DURABLE_LIFE_PERIOD_PHARMACY 2

#define DURABLE_LIFE_PERIOD_SEAFOOD 3

#define DURABLE_LIFE_PERIOD_BEVERAGE 6

#define DURABLE_LIFE_PERIOD_CANNED 8

#define DURABLE_LIFE_PERIOD_JARRED 10

#define DURABLE_LIFE_PERIOD_DRY_FOOD 12

#define DURABLE_LIFE_PERIOD_DAIRY 7

#define DURABLE_LIFE_PERIOD_BAKERY 2

#define DURABLE_LIFE_PERIOD_PERSONAL_CARE 9

#define DURABLE_LIFE_PERIOD_PAPER_GOODS 14



// Define the encryption key for encryption method 1.

#define ENCRYPTION_KEY_1 "zyxwvutsrqponmlkjihgfedcba"



// Define the encryption key for encryption method 2.

#define ENCRYPTION_KEY_2 "nopqrstuvwxyzabcdefghijklm"



// Define the encryption key for encryption method 3.

#define ENCRYPTION_KEY_3 "plmoknijbuhvygctfxrdzeswaq"



// Define the encryption key for encryption method 5.

#define ENCRYPTION_KEY_5 "abcdefghijklmnopqrstuvwyxz"



// Define the encryption key for encryption method 6.

#define ENCRYPTION_KEY_6 "0123456789"



// Define the encryption key for encryption method 7.

#define ENCRYPTION_KEY_7 "USD"



// Define the number of digits for the barcode.

#define BARCODE_LENGTH 10



// Define the number of items in the store.

#define NUM_ITEMS (NUM_MEAT + NUM_DELI + NUM_PHARMACY + NUM_SEAFOOD + NUM_BEVERAGE + NUM_CANNED + NUM_JARRED + NUM_DRY_FOOD + NUM_DAIRY + NUM_BAKERY + NUM_PERSONAL_CARE + NUM_PAPER_GOODS)



// Define the struct for an item.

struct Item {

    char name[MAX_LENGTH];

    char category[MAX_LENGTH];

    char company[MAX_LENGTH];

    double purchased_price;

    double sale_price;

    int quantity;

    char date_purchased[MAX_LENGTH];

    char date_production[MAX_LENGTH];

    char expiry_date[MAX_LENGTH];

    int store_code;

    char currency[MAX_LENGTH];

    char barcode[BARCODE_LENGTH + 1];

};

 

Avatar image
shivamrajbhar950 answered this question
Lv1
in Information Technology·
23 Mar 2023

Hello. I appriciate ur help with this. Unfortunatly code did not work in my vs code. One of the libraries lastly listed #include <openssl/sha.h> is not existing. Also, the bottom of code there is info that iv never used in my class, not sure. // Define the struct for a category. struct Category  char name

 

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <time.h>

#include <openssl/sha.h>

 

// Define the maximum length of a string.

#define MAX_LENGTH 100

 

// Define the number of items in each category.

#define NUM_MEAT 2

#define NUM_DELI 2

#define NUM_PHARMACY 2

#define NUM_SEAFOOD 2

#define NUM_BEVERAGE 2

#define NUM_CANNED 2

#define NUM_JARRED 2

#define NUM_DRY_FOOD 2

#define NUM_DAIRY 2

#define NUM_BAKERY 2

#define NUM_PERSONAL_CARE 2

#define NUM_PAPER_GOODS 2

 

// Define the number of categories.

#define NUM_CATEGORIES 12

 

// Define the durable life period of each category.

#define DURABLE_LIFE_PERIOD_MEAT 5

#define DURABLE_LIFE_PERIOD_DELI 4

#define DURABLE_LIFE_PERIOD_PHARMACY 2

#define DURABLE_LIFE_PERIOD_SEAFOOD 3

#define DURABLE_LIFE_PERIOD_BEVERAGE 6

#define DURABLE_LIFE_PERIOD_CANNED 8

#define DURABLE_LIFE_PERIOD_JARRED 10

#define DURABLE_LIFE_PERIOD_DRY_FOOD 12

#define DURABLE_LIFE_PERIOD_DAIRY 7

#define DURABLE_LIFE_PERIOD_BAKERY 2

#define DURABLE_LIFE_PERIOD_PERSONAL_CARE 9

#define DURABLE_LIFE_PERIOD_PAPER_GOODS 14

 

// Define the encryption key for encryption method 1.

#define ENCRYPTION_KEY_1 "zyxwvutsrqponmlkjihgfedcba"

 

// Define the encryption key for encryption method 2.

#define ENCRYPTION_KEY_2 "nopqrstuvwxyzabcdefghijklm"

 

// Define the encryption key for encryption method 3.

#define ENCRYPTION_KEY_3 "plmoknijbuhvygctfxrdzeswaq"

 

// Define the encryption key for encryption method 5.

#define ENCRYPTION_KEY_5 "abcdefghijklmnopqrstuvwyxz"

 

// Define the encryption key for encryption method 6.

#define ENCRYPTION_KEY_6 "0123456789"

 

// Define the encryption key for encryption method 7.

#define ENCRYPTION_KEY_7 "USD"

 

// Define the number of digits for the barcode.

#define BARCODE_LENGTH 10

 

// Define the number of items in the store.

#define NUM_ITEMS (NUM_MEAT + NUM_DELI + NUM_PHARMACY + NUM_SEAFOOD + NUM_BEVERAGE + NUM_CANNED + NUM_JARRED + NUM_DRY_FOOD + NUM_DAIRY + NUM_BAKERY + NUM_PERSONAL_CARE + NUM_PAPER_GOODS)

 

// Define the struct for an item.

struct Item {

    char name[MAX_LENGTH];

    char category[MAX_LENGTH];

    char company[MAX_LENGTH];

    double purchased_price;

    double sale_price;

    int quantity;

    char date_purchased[MAX_LENGTH];

    char date_production[MAX_LENGTH];

    char expiry_date[MAX_LENGTH];

    int store_code;

    char currency[MAX_LENGTH];

    char barcode[BARCODE_LENGTH + 1];

};

 

// Define the struct for a category.

struct Category {

    char name

Lv1
in Information Technology·
22 Mar 2023

Hello. This is a C program language code im needing and i use vs code compiler. Im needing a writen code in C program.  Please make sure encryption methods are added. Thx.

In this activity, you are designing an application for grocery stores and their inventories.

The items depending on their type are divided into the following categories:

Group A: Meat

Group B: Deli

Group C: Pharmacy

Group D: Seafood

Group E: Beverage

Group F: Canned

Group G: Jarred

Group H: Dry Food

Group I: Dairy

Group J: Bakery

Group K: Personal Care

Group L: Paper Goods

Your store must have at two items in each category.

Your application as the first step needs to collect the following information before importing the items to the store:

1. The name of the product

2. The Category

3. The Company/Manufacturer name

4. The purchased price (What company has paid to buy this product)

5. The sale price (What customers will pay to buy this product)

6. The quantity of the purchased items

7. The date of the purchased items

8. The date of the production

9. The expiry date of the product

10. Store Code (a 4-digit number)

11. The currency of the country


12. Items will go on sale on different dates depending on their categories.

Your application is responsible to use encryption method 1 for #1, and #3. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 2 for #2. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 3 for #4, and #5. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 4 for #6. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 5 for #7, #8, and #9. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 6 for #10. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 7 for #11. (You have to define the suitable encryption method.)


The output of the encryptions will generate a number that will be known as the barcode of that specific item in this store.

Before selecting and implementing your encryption methods, you have to answer the following questions:

- Will all the generated barcodes have the same number of digits?

- How should we deal with barcodes that have different numbers of digits?

- Do you need to define decryption?

- Is there any other questions, aspects, complications, simplifications, etc. that I need to think about in advance?

Items will go on sale on different dates depending on their categories.

Group A, B, C, and D follow the following rules:

- Items will go on a 10% promotion when the date passes 50% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 65% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 75% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group E, F, G, and H follow the following rules:

- Items will go on a 10% promotion when the date passes 60% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 70% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 80% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory


Groups I, J, and K follow the following rules:

- Items will go on a 10% promotion when the date passes 40% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 50% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 60% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group L follows the following rules:

- Items will go on a 10% promotion when the date passes 70% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 80% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 90% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

The output of your program will be a printed receipt that shows a list of 12 items (one item from each category), 8 items with the regular price, and 4 items on sale that a customer bought also the customer has 3 items to return from three different categories.

A receipt needs to include the following information on it:

- The price of each item that has a regular price

- If the price is reduced the reduction amount and sales percentage will be printed on the lines below the regular price; therefore the customer will see the regular price, the sales price, the reduced amount, and the sales percentage

- Each item has a unique barcode
- The date of the purchase
- The store number along with the address of the store
- The final Balance
- The payment method

Lv1
in Information Technology·
22 Mar 2023

Hello. This is a C program language code im needing and i use vs code compiler. Im needing a writen code in C program.  Thx.

 

In this activity, you are designing an application for grocery stores and their inventories.

The items depending on their type are divided into the following categories:

Group A: Meat

Group B: Deli

Group C: Pharmacy

Group D: Seafood

Group E: Beverage

Group F: Canned

Group G: Jarred

Group H: Dry Food

Group I: Dairy

Group J: Bakery

Group K: Personal Care

Group L: Paper Goods

Your store must have at two items in each category.

Your application as the first step needs to collect the following information before importing the items to the store:

1. The name of the product

2. The Category

3. The Company/Manufacturer name

4. The purchased price (What company has paid to buy this product)

5. The sale price (What customers will pay to buy this product)

6. The quantity of the purchased items

7. The date of the purchased items

8. The date of the production

9. The expiry date of the product

10. Store Code (a 4-digit number)

11. The currency of the country


12. Items will go on sale on different dates depending on their categories.

Your application is responsible to use encryption method 1 for #1, and #3. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 2 for #2. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 3 for #4, and #5. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 4 for #6. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 5 for #7, #8, and #9. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 6 for #10. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 7 for #11. (You have to define the suitable encryption method.)


The output of the encryptions will generate a number that will be known as the barcode of that specific item in this store.

Before selecting and implementing your encryption methods, you have to answer the following questions:

- Will all the generated barcodes have the same number of digits?

- How should we deal with barcodes that have different numbers of digits?

- Do you need to define decryption?

- Is there any other questions, aspects, complications, simplifications, etc. that I need to think about in advance?

Items will go on sale on different dates depending on their categories.

Group A, B, C, and D follow the following rules:

- Items will go on a 10% promotion when the date passes 50% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 65% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 75% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group E, F, G, and H follow the following rules:

- Items will go on a 10% promotion when the date passes 60% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 70% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 80% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory


Groups I, J, and K follow the following rules:

- Items will go on a 10% promotion when the date passes 40% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 50% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 60% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group L follows the following rules:

- Items will go on a 10% promotion when the date passes 70% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 80% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 90% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

The output of your program will be a printed receipt that shows a list of 12 items (one item from each category), 8 items with the regular price, and 4 items on sale that a customer bought also the customer has 3 items to return from three different categories.

A receipt needs to include the following information on it:

- The price of each item that has a regular price

- If the price is reduced the reduction amount and sales percentage will be printed on the lines below the regular price; therefore the customer will see the regular price, the sales price, the reduced amount, and the sales percentage

- Each item has a unique barcode
- The date of the purchase
- The store number along with the address of the store
- The final Balance
- The payment method

Lv1
in Information Technology·
22 Mar 2023

Hello. This is a C program language code im needing and i use vs code compiler. Please no errors as the last guy sent to me.  Thx.

 

In this activity, you are designing an application for grocery stores and their inventories.

The items depending on their type are divided into the following categories:

Group A: Meat

Group B: Deli

Group C: Pharmacy

Group D: Seafood

Group E: Beverage

Group F: Canned

Group G: Jarred

Group H: Dry Food

Group I: Dairy

Group J: Bakery

Group K: Personal Care

Group L: Paper Goods

Your store must have at two items in each category.

Your application as the first step needs to collect the following information before importing the items to the store:

1. The name of the product

2. The Category

3. The Company/Manufacturer name

4. The purchased price (What company has paid to buy this product)

5. The sale price (What customers will pay to buy this product)

6. The quantity of the purchased items

7. The date of the purchased items

8. The date of the production

9. The expiry date of the product

10. Store Code (a 4-digit number)

11. The currency of the country


12. Items will go on sale on different dates depending on their categories.

Your application is responsible to use encryption method 1 for #1, and #3. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 2 for #2. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 3 for #4, and #5. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 4 for #6. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 5 for #7, #8, and #9. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 6 for #10. (You have to define the suitable encryption method.)

Your application is responsible to use encryption method 7 for #11. (You have to define the suitable encryption method.)


The output of the encryptions will generate a number that will be known as the barcode of that specific item in this store.

Before selecting and implementing your encryption methods, you have to answer the following questions:

- Will all the generated barcodes have the same number of digits?

- How should we deal with barcodes that have different numbers of digits?

- Do you need to define decryption?

- Is there any other questions, aspects, complications, simplifications, etc. that I need to think about in advance?

Items will go on sale on different dates depending on their categories.

Group A, B, C, and D follow the following rules:

- Items will go on a 10% promotion when the date passes 50% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 65% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 75% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group E, F, G, and H follow the following rules:

- Items will go on a 10% promotion when the date passes 60% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 70% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 80% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory


Groups I, J, and K follow the following rules:

- Items will go on a 10% promotion when the date passes 40% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 50% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 60% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

Group L follows the following rules:

- Items will go on a 10% promotion when the date passes 70% of the durable life period - Yellow Tag

- Items will go on a 25% promotion when the date passes 80% of the durable life period - Green Tag

- Items will go on a 50% promotion when the date passes 90% of the durable life period - Red Tag

- Items will go on a 95% promotion when the date passes 95% of the durable life period - Star Tag and Final Sale (Bring Me Home Today!)

- Items with less than one day of their durable life period must be removed from the shelves and storage to be removed from the inventory

The output of your program will be a printed receipt that shows a list of 12 items (one item from each category), 8 items with the regular price, and 4 items on sale that a customer bought also the customer has 3 items to return from three different categories.

A receipt needs to include the following information on it:

- The price of each item that has a regular price

- If the price is reduced the reduction amount and sales percentage will be printed on the lines below the regular price; therefore the customer will see the regular price, the sales price, the reduced amount, and the sales percentage

- Each item has a unique barcode
- The date of the purchase
- The store number along with the address of the store
- The final Balance
- The payment method


Start filling in the gaps now
Log in