Εμφάνιση 1-5 από 5
  1. #1
    Εγγραφή
    24-11-2014
    Περιοχή
    Γκαζι Ρουφ
    Μηνύματα
    140
    Downloads
    7
    Uploads
    0
    Τύπος
    FTTH
    Ταχύτητα
    1000/100
    ISP
    Nova
    Router
    hg8145v5
    Path Level
    Fastpath
    καλησπερα μπορει καποιος να με βοηθησει με ενα project που εχω ? ο καθηγητης συνεχιζει να υποστιριζει ειναι ευκολο και βγαινει με απλες εντολες το θεμα ειναι οτι αλλο οι απλες ακησεις που κανουμε και αλλο ατο που θα σας δειξω οτι μας ζηταει ...
    ειδικα τωρα με τα μαθηματα εξ αποστασεως εχασα την μπαλα .. το προγραμμα που μας ζηταει να κανουμε ειναι το εξης

    A coffee shop needs to keep track the orders for delivery they receive by phone calls.
    The coffee shop has 3 employees that will be using the system, all will have a user account to login.

    After each order placed the user will enter to the system:
    • The name of the customer
    • Address of the customer
    • Date (DDMMYY)
    • Total amount of order
    In addition, a customer ID is generated by the system and stored along with the above information.
    The user (employee of the coffee shop) will be able to select from the system to see, at least, the following:
    • Numbers of order placed by one specific customer
    • Number of orders in one specific day
    • Total amount of all orders delivered
    • Total amount of the orders placed by a specific customer
    • Total amount of the orders placed by a specific day



    απο οσο καταλαβα ειναι ολοκληρο προγραμμα για coffee shop χωρις UI κολλαω στο δευτερο κομματι δεν ξερω πως να αρχισω !

    αν μπορει καποιος να βοηθησει ... ? Ευχαριστω πολυ

  2. #2
    Εγγραφή
    13-11-2011
    Περιοχή
    Χολαργός
    Ηλικία
    37
    Μηνύματα
    1.444
    Downloads
    1
    Uploads
    0
    Τύπος
    VDSL2
    Ταχύτητα
    24000 / 4500
    ISP
    Wind
    DSLAM
    Wind - ΧΟΛΑΡΓΟΣ
    Path Level
    Interleaved
    Το project είναι όντως αρκετά απλό, αν το πάρεις βήμα βήμα και το αναλύσεις. Σε τι περιβάλλον/γλώσσα πρέπει να το κάνετε και με τι τεχνολογίες δουλεύετε;

    Πρακτικά έχεις δύο οθόνες, μία καταχώρησης και μία αναζήτησης/αναφορών. Αλλά τα πάντα γυρνάνε γύρω από την παραγγελία. Καταχωρείς την παραγγελία και μετά απλά την δείχνεις (είτε μόνη της είτε σαν συγκεντρωτικά δεδομένα).

    Δεν διαφέρει και πολύ από το πρόβλημα "ο χρήστης δίνει νούμερα το ένα μετά το άλλο, όποια στιγμή θέλει μπορεί να επιλέξει να δει όλα τα νούμερα, μόνο τα μονά, το άρθροισμα των ζυγών, το άρθροισμα των τελευταίων 10 αριθμών". Αν μπορείς να κάνεις το ένα σίγουρα μπορείς να κάνεις και το άλλο.

  3. #3
    Εγγραφή
    24-11-2014
    Περιοχή
    Γκαζι Ρουφ
    Μηνύματα
    140
    Downloads
    7
    Uploads
    0
    Τύπος
    FTTH
    Ταχύτητα
    1000/100
    ISP
    Nova
    Router
    hg8145v5
    Path Level
    Fastpath
    σε python το θελει ! εχω κανει μεχρι εδω

    #coffee shop program
    #first we must create the authentication username and password for the 3 employees

    count = 0
    while true:
    username = input("hello! welcome to our coffee shop , please wear a mask ! \n\nusername:")
    password = input("password:")
    count += 1
    if count == 3:
    #tells user is not right and says bye
    break
    else:
    if username == 'john' or 'nick' or 'victor' and password == 'blue' or 'green' or 'yellow':
    #let them in
    break
    #they are in exit loop
    else:
    print('authentication username and password is wrong please try again')


    #the process for username and password ends here

    #if we not want to use username and password we can do this

    attempts = 0
    while attempts<3: #because we have 3 users
    username=input('username?')
    password=input('password?')
    if username=='correctusername' and password=='correctpassword':
    print('you are in!')
    else:
    attempts+=1
    print('incorrect!')
    if attempts==3:
    print('too many attempts')
    #checks if it is correct through an if-statement. Then, when the attempts have exceeded the maximum amount of allowed attempts, tells the user that

    #create a list with the names of the customers ordered coffee

    #create a list of string names
    newcustomername=0
    Customers = ["mark","amber","nick", "anita", "elena"]
    customers.append("john")
    newcustomer = "nikoleta"
    customer.append(newcustomer)
    print('newsutomers')

    #total ammount of orders , specific day and time

    while True:
    CustomerName = input("Customer's Name:")
    CustomerAddress = input("Customer's Address:")


    if CustomerName in Customers:
    Customers[CustomerName]['Orders'] += 1
    else:
    Customers[CustomerName] = {}
    Customers[CustomerName]['Address'] = CustomerAddress
    Customers[CustomerName]['ID'] = uuid.uuid1()
    Customers[CustomerName]['Orders'] = 1


    print("This customer has ordered {} time(s)".format(Customers[CustomerName]['Orders']))

    print("Current Date is: {}".format(TodayDate))
    OrderPrice = input("Total amount of order:")

    #end of proccess

  4. #4
    Εγγραφή
    13-11-2011
    Περιοχή
    Χολαργός
    Ηλικία
    37
    Μηνύματα
    1.444
    Downloads
    1
    Uploads
    0
    Τύπος
    VDSL2
    Ταχύτητα
    24000 / 4500
    ISP
    Wind
    DSLAM
    Wind - ΧΟΛΑΡΓΟΣ
    Path Level
    Interleaved
    Για αρχή βάλε code tags γιατί είναι δυσνόητο έτσι (ειδικά για Python που έχουν σημασία τα tab)!!!

    Κώδικας:
    if username == 'john' or 'nick' or 'victor' and password == 'blue' or 'green' or 'yellow':
    Αυτό σημαίνει ότι οι χρήστες μπορούν να μπουν με οποιοδήποτε κωδικό από τους τρεις (john-blue, john-green, john-yellow κτλ). Πρέπει να συγκρίνεις το σωστό όνομα με τον κωδικό! Αν δεν θέλεις να χρησιμοποιήσεις κλάσεις δες πώς θα μπορούσες να χρησιμοποιήσεις κάποια άλλη δομή που να έχει μία αντίστοιχη λειτουργία (πχ Dictionaries).

    Πρέπει να βρεις μία δομή, στην οποία θα κρατάς τις παραγγελίες με όλα τα στοιχεία τους ώστε να μπορείς να βγάλεις τα στατιστικά αργότερα. Δεν είναι ανάγκη να τα κρατάς σε κάθε παραγγελία, τα υπολογίζεις όταν ζητηθούν. Επίσης δεν ζητάς πουθενά το κόστος της παραγγελίας και την ημερομηνία, δεν θα έπρεπε να τα ζητάς;

    Δοκίμασε να βάλεις μία διαδικασία επιλογών, αντί να έχεις μία σειρά που γίνονται όλα.
    πχ:
    Επιλέξτε λειτουργία:
    1. Καταχώρηση παραγγελίας
    2. Στατιστικά στοιχεία
    0. Έξοδος
    Αν πατήσει 1. τότε του δείχνει την διαδικασία καταχώρησης, αν πατήσει 2 του εμφανίζει ένα άλλο μενού που πρέπει να επιλέξει τα στατιστικά. Ανάλογα το τι διαλέγει μπορεί να πρέπει να τον ξαναρωτήσεις κάτι (πχ πελάτη) για να του δείξεις το σωστό στατιστικό.

  5. #5
    Εγγραφή
    24-11-2014
    Περιοχή
    Γκαζι Ρουφ
    Μηνύματα
    140
    Downloads
    7
    Uploads
    0
    Τύπος
    FTTH
    Ταχύτητα
    1000/100
    ISP
    Nova
    Router
    hg8145v5
    Path Level
    Fastpath
    καταλαβα θα το προσπαθησω , ευχαριστω πολυ παντως!!!

Bookmarks

Bookmarks

Δικαιώματα - Επιλογές

  • Δεν μπορείτε να δημοσιεύσετε νέα θέματα
  • Δεν μπορείτε να δημοσιεύσετε νέα μηνύματα
  • Δεν μπορείτε να αναρτήσετε συνημμένα
  • Δεν μπορείτε να επεξεργαστείτε τα μηνύματα σας
  •  
  • Τα BB code είναι σε λειτουργία
  • Τα Smilies είναι σε λειτουργία
  • Το [IMG] είναι σε λειτουργία
  • Το [VIDEO] είναι σε λειτουργία
  • Το HTML είναι εκτός λειτουργίας