A little tip I picked up from boardroom presentations when I was in industry...
Imagine you are a keynote speaker at a conference. Begin your presentation with the words "I will respond to any questions at the end of the presentation". If anybody, including X, attempts to ask a question, repeat the words "I will respond to questions at the end of the presentation".
Create a final slide, after your summary, that says, simply 'Any questions?'. If his motivation is to disrupt, X will probably ask far fewer questions this way.
 If X asks why you have chosen methodology Y in preference to methodology Z, think about the reasons you did use methodology Y. It is perfectly acceptable to answer that this is personal preference. If you haven't heard of methodology Z it is also fine to say that you are familiar with methodology Y but you may consider using methodology Z in the future, when you are more familiar with it. (Do not commit to using methodology Z - your way may be better).
As the person marking your presentation, I would not penalise you for this unless methodology Z was mentioned in the assignment brief.
 Some knowledge of Education Psychology would suggest that X's attempts to show off his expert knowledge and belittle other people by exposing the limitations of theirs are strongly suggestive of low self-esteem (or psychopathy but let's stick with the most likely scenario). The facts that he claims to be attempting to 'push the presenter to their limits' and to have lacked confidence in school strongly support this. These actions may not be intentionally malicious but they may make him feel that he is a comparatively strong student and deserves to be on the course.
It appears that X is mistaking arrogance for confidence and if your friendship is strong enough, you may be able to, subtly, point out that his actions are not always interpreted by others as being assertive and confident but may be seen as arrogant or just plain annoying. Since this is a relatively new friendship, I appreciate this may be difficult, especially if you are both male and have been conditioned not to discuss such things.
However, many people who lack self-esteem respond disproportionally to praise so you could try 'Parenting 101' - pile praise and compliments on X, or at least make sure he realises you are 'impressed' when he does things you approve of (but try not to be TOO obvious) and withhold comment if he does something that most people would deem to be inappropriate. If X is seeking attention and validation, ignoring his unwanted behaviour will gradually make those actions unfulfilling for him and he will stop.
[4a] In conjunction with , it may be worth framing your answer as a question: you can respond to the first question with "Why do you ask that question?" If he answers, you are then in the rôle of questioner and have shifted the balance of power in the discussion. This will allow you take back control and regain your confidence.
[4b] For the sake of completeness, I have seen a misogynistic office bully silenced by the following technique but I would NOT be inclined to use it with young people (and as a lecturer it would be inappropriate). As his peer, if you are feeling particularly evil, you could build from [4a] and make ever more in-depth enquiries until X reaches the limit of his knowledge, which will usually take 3-4 carefully considered questions. There is a delicate balance to be struck here: don't try to make him look stupid - apart from being morally wrong, that will just make you appear vindictive.
This is a very risky strategy. You would probably only have to do it once but it may put an irreparable strain on your friendship. However, if X is as disruptive as you suggest, it may earn the respect of your class-mates and have you considered that X may be the very reason you have few other friends?