Turn on thread page Beta

I need help with a Visual Basic project for GCSE watch

    • Thread Starter
    Offline

    4
    ReputationRep:
    Anyone know how to create a program that you enter your loyalty card number,expiry date, name and postcode. It has to check if the card has expired, if the loyalty card number is valid by:
    Allowing the user to enter the 8 digits
    Removing the 8th digit and storing it as Check_digit
    Reversing the numbers
    Multiplying the 1st 3rd 5th and 7th digits by 2
    ^If the result is greater than 9 then subtract 9 from the result
    Add together the resulting 7 digits
    Finally check if the sum of the added digits plus the check_digit is divisible by 10
    Anyone able to help me
    Offline

    18
    ReputationRep:
    How far have you managed to get with this? It would help if you could specific about which part of this you're stuck on, including the code you've tried to solve each problem, any errors, or detail about what isn't working. .

    Is this a Console app or a GUI program? If it's a GUI program Have you attempted to create the visual layout in a Form using the appropriate controls? If it's a console program, do you know how to read input from the user and write out to the console?

    Take each of the program's requirements one step at a time, and make sure you compile + run your program as often as possible after every tiny change to make sure you stay on top of any errors. Don't try to solve everything at once.

    If a problem seems too complex, break it down into something smaller and just solve one part of that problem on its own, then move on to the next piece of that problem, and so on. For example, if the user types in 8 digits, do you know how to get the 8th digit of the user's input? Then do you know how to remove that digit or get the other 7 remaining digits?

    If you get stuck with specific problems in Visual Basic, such as any compiler errors, or you need some simple examples such as how to get some data from a user, google for the thing you're trying to do, and you'll be very likely to find a lot of examples and tutorials online which match the problem you're having. You might also find a lot of useful answers to Visual Basic programming questions on https://www.stackoverflow.com/ from people who have gotten stuck in the same way as you before.
    • Thread Starter
    Offline

    4
    ReputationRep:
    How would I put an expiry date on the card. So say i want the expiry date to be tomorrow 1/3/18 how would i do that and validate whether or not their card is valid or not?
    Offline

    15
    ReputationRep:
    TBH im a beginner at programming, but break it down:

    - You need to validate to have numbers or special characters only
    - It has to be equal to or greater than the date today
    • Thread Starter
    Offline

    4
    ReputationRep:
    Also I have done calculations so how do i make sure all 7 numbers plus the 8th(stored in a variable) are divisible by 10?
    Offline

    18
    ReputationRep:
    (Original post by TDevlin172)
    How would I put an expiry date on the card. So say i want the expiry date to be tomorrow 1/3/18 how would i do that and validate whether or not their card is valid or not?
    You can help users choose a date on a UI using the DateTimePicker control:
    https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

    DateTime.Today could help you in your validation: https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

    (Original post by TDevlin172)
    Also I have done calculations so how do i make sure all 7 numbers plus the 8th(stored in a variable) are divisible by 10?
    You can use the Mod operator to check whether two numbers are evenly divisible - https://docs.microsoft.com/en-us/dot...s/mod-operator
 
 
 

University open days

  1. University of Bradford
    University-wide Postgraduate
    Wed, 25 Jul '18
  2. University of Buckingham
    Psychology Taster Tutorial Undergraduate
    Wed, 25 Jul '18
  3. Bournemouth University
    Clearing Campus Visit Undergraduate
    Wed, 1 Aug '18
Poll
How are you feeling in the run-up to Results Day 2018?
Useful resources

Study tools

Rosette

Essay expert

Learn to write like a pro with our ultimate essay guide.

Thinking about uni already?

Thinking about uni already?

See where you can apply with our uni match tool

Student chat

Ask a question

Chat to other GCSE students and get your study questions answered.

Creating

Make study resources

Create all the resources you need to get the grades.

Planner

Create your own Study Plan

Organise all your homework and exams so you never miss another deadline.

Resources by subject

From flashcards to mind maps; there's everything you need for all of your GCSE subjects.

Papers

Find past papers

100s of GCSE past papers for all your subjects at your fingertips.

Help out other students

Can you help? Study help unanswered threads

Groups associated with this forum:

View associated groups

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.