[C++] I can help anyone

Discussion in 'Programming' started by blackrainbowelte, Mar 10, 2011.

  1. #1
    I've made this topic because I can help anyone in C++ programming. I am studying it at a university, and it's a good practise for me.

    I'm not familiar with QT4 so no GUI.

    I can also help in C# and Java (GUI is OK with these two).
     
    blackrainbowelte, Mar 10, 2011 IP
  2. Client Management System

    Client Management System Peon

    Messages:
    19
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    No GUI or no Qt ?
     
  3. Gibs

    Gibs Active Member

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #3
    can you help me making android apps?
     
    Gibs, Mar 13, 2011 IP
  4. blackrainbowelte

    blackrainbowelte Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No GUI in C++. :) I only know QT4 but not enough..

    What kind of android apps? It's very java-like so maybe yes. :)
     
    blackrainbowelte, Mar 13, 2011 IP
  5. Mafizx

    Mafizx Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    help me for thisss!! pleaseee



    #include<stdio.h>
    #include<string.h>
    #include<conio.h>

    struct menuItemType
    {
    char menuItem[15];
    double menuPrice;
    }
    menuList[]= {"Plain Egg",2.50,
    "Bacon and Egg",3.45,
    "Muffin",2.20,
    "French Toast",2.95,
    "Fruit Basket",3.45,
    "Cereal",0.70,
    "Coffee",1.50,
    "Tea",1.80
    },order[10];

    void getData(struct menuItemType[],struct menuItemType[],int*);
    void showMenu(struct menuItemType[],int);
    void printCheck(struct menuItemType[],int );

    int main()
    {
    int items = 0;

    printf("Welcome to HiFi's Restaurant\n");
    printf("\n");
    printf("******* MAIN MENU *******\n");
    printf("\n");
    printf("No.\tItem\t Price\n");
    printf("-------------------------\n");
    showMenu(menuList,8);
    getData(menuList,order,&items);
    printCheck(order,items);
    getch();
    return 0;
    }

    void printCheck(struct menuItemType order[],int items)
    {
    int i;
    double total = 0,tax;

    printf("\n****** Your Final Bill ******\n");
    printf("\n");
    printf(" Item\t Price\n");
    printf("\n");
    showMenu(order,items);
    for(i=0;i<items;i++)
    total += order.menuPrice;
    printf("\nItem Total\t$%.2f\n",total);
    tax = total*0.05;
    printf("\nTax 5%%\t\t$%.2f\n",tax);
    printf("----------------------");
    printf("\nAmount Due\t$%.2f\n",total+tax);
    printf("----------------------");
    }

    void getData(struct menuItemType menu[],struct menuItemType order[],int* items)
    {
    char response = 'Y',garbage;
    int n;

    while(response == 'Y'||response == 'y') {
    printf("Enter your order item number: ");
    scanf("%d",&n);

    while(n<1||n>8){
    printf("Invalid item number\n");
    printf("Enter your order item number: ");
    scanf("%d",&n);
    }
    //order[*items].menuItem=menu[n-1].menuItem;
    strcpy(order[*items].menuItem,menu[n-1].menuItem);
    order[*items].menuPrice = menu[n-1].menuPrice;
    *items = *items+1;
    scanf("%c",&garbage);
    printf("Would you like another item?(y/n)? ");
    scanf("%c",&response);
    }
    }

    void showMenu(struct menuItemType a[],int n)
    {
    int i;

    for(i=0;i<n;i++)
    printf("%d %-16s$%.2f\n",i+1,a.menuItem,a.menuPrice);
    printf("\n");

    }
     
    Mafizx, Mar 13, 2011 IP
  6. Mafizx

    Mafizx Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items:



    a. Show the customer the different breakfast items offered by the HiFi’s Restaurant.

    1. b. Allow the customer to select more than one item from the menu.
    2. c. Calculate and print the bill to the customer.
    3. d. Produce a report to present your complete program and show more sample output.



    Assume that the HiFi’s Restaurant offers the following breakfast menu:



    Plain Egg $2.50

    Bacon and Egg $3.45

    Muffin $2.20

    French Toast $2.95

    Fruit Basket $3.45

    Cereal $0.70

    Coffee $1.50

    Tea $1.80



    Your program must do the following task below:



    a. Define the data structs, menu item types with two components: menu item of type string and menu price of type double. Use an array to declare the data structs.

    b. Function get data to loads the data into the array menu list.

    c. Function show menu to show the different breakfast items offered by the restaurant and tell the user how to select the items.

    d. Function print receipt to calculates and prints the customer receipt. The billing amount should include a 5% tax.

    e. Format your output with two decimal places. The name of each item in the output must be left-justify. You may assume that the user selects only one item of a particular type.
     
    Mafizx, Mar 13, 2011 IP
  7. blackrainbowelte

    blackrainbowelte Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I've sent you a PM.
     
    blackrainbowelte, Mar 14, 2011 IP