help...

  • Thread starter Thread starter Corey Dyke
  • Start date Start date
C

Corey Dyke

k here's the deal. im in desperate need of help with C#.
i'm taking a course at DeVry now and we're doing C#.
i've done C++ last semester, so i know i should be able to
catch on to this stuff. but i can't seem to get a grasp on it
at all. i don't know how C# really works. and i have a
program due on tuesday. here's what it is..

we have to write a program to as the user to enter a choice
to display a multiplication table for numbers 1-9. the first
choice they have is to display it in decimal. the second
choice they have is to display it in hexadecimal. and im
totally lost in where to start and how to do it. if any of you
can help me, i'd grealy appreciate it.

thanks

Corey
 
i've done C++ last semester, so i know i should be able to
catch on to this stuff. but i can't seem to get a grasp on it
at all. i don't know how C# really works.
What do you mean by "how it really works"?
Which part?
we have to write a program to as the user to enter a choice
to display a multiplication table for numbers 1-9. the first
choice they have is to display it in decimal. the second
choice they have is to display it in hexadecimal. and im
totally lost in where to start and how to do it. if any of you
can help me, i'd grealy appreciate it.

Start at the beginning. Plan what you have to do and break it down into
smaller steps. Write each one and get it to work, then move on to the
next. A basic outline might look like;

-> prompt the user
see: Console.WriteLine("a prompt");

-> read from the keyboard
see: Console.ReadLine();

-> check the value you get from the keyboard
see: if/else or select/case statements

-> generate and print multiplication tables
Draw the start of one on paper and watch how you write it.
Probably in rows... 1*1, 1*2, 1*3... then 2*1, 2*2, 2*3...
see: 'for' loops and Console.Write()

Start with getting part of a multiplication table printed, or just one in
decimal before worrying about hex.
It's tough to try being helpful without giving it away completely, but I
hope this helps :)
Cheers,
Simon.
 
Or you can drop this course and take something else.
What kind of professional are you hoping to become if you cannot handle your
homework in college and ask people to do your homework for you??? Why don't
you ask your teacher?
 
well im not asking for people to do it : )
im just looking for some advice/tips on how to get it done.
 
Corey,

It sounds as if you either haven't been taught, or haven't absorbed, the
basics of object technology. However, nothing in a simple program like this
really demands a grasp of OO technology. If you create a console
application from Visual Studio you will have a shell class with a Main()
method and that is just the entry point ... you can add other static methods
to the class that you might wish to call, and treat them as functions from
within Main().

My suspicion is that your assignment is to demonstrate a basic grasp of the
language. If so, don't get bogged down in figuring out the OOP stuff. You
aren't going to grok than in a couple of days, anyway. (I hope you didn't
put this assignment off to the last minute! If so -- naughty, naughty!).

--Bob
 
Are you taking a course in C#? If yes, then this course should have had
enough information to complete your assignment. The purpose of the
assignments is to reassure that you've understood the course material. If
you fail your assignemnt it would mean that either you did not do proper job
in this course, or the course was badly delivered. In either case you should
not be getting any credits for this course. The hints and tips for the
solution of this particular assignment are in the course material that you
have received.
The questions that you are asking in this NG should have been addressed to
your teacher during the course, before the assignment was handed out. Now
you are trying to cheat.
Do your homework on time, not two-three days before the assignment is due.
Get a life.
 
Corey Dyke said:
thanks, i appreciate the help. the main thing that im confused with
are the classes and methods, im not entirely clear on how they work

Just out of curiosity, what textbook are you using? (I'm assuming you
have one).

I've been looking around on the 'net for a good beginner's article on
classes and methods in C#. I'm not finding any good ones. Here's one
that's probably more intermediate in scope:
http://www.developer.com/net/csharp/article.php/1471791

You did inspire me to create my own beginner's guide to OOP using C#.
For now I'm hosting this at home, so if it's slow in serving, please
bear with me!
http://www.mag37.com/csharp/ClassesObjectsMethods.html

But like Bob Grommes said, getting wrapped up in OOP probably isn't
too good right now. You probably are looking for something more like
this:
http://msdn.microsoft.com/library/d.../en-us/cptutorials/html/hello_world_in_c_.asp

And just put all your code (if statements, for loops, etc) in the Main
procedure.

Hope this helps!
Mike Mayer
 
I'm not sure who you thing you are 'dd' but you seem to be in a
terrible mood today. Hope you're not always like that. Not
everybody's as "smart" as you. I don't know Corey's teacher. I know
my roommate in college had a lousy comp-sci teacher so I had to help
him with a lot of comp-sci projects. And it's not because my roommate
didn't try - it's just that not everybody is born a coder. Can people
learn, I'd like to think so.

Anyway, there's nothing wrong with asking for some help now and again.
And that's what newsgroups are for.

But I agree, I hope nobody on the ng decides to code it up for Corey,
thereby eliminating the learning that should be going on. (Maybe I
should start a new company to do homework for cash, ahh, probably
already been done before and I hated homework enough the first time
through).
 
my semester started last monday. the assignment was givin on this past
wednesday. and we haven't had a class since then. he hasn't shown us any
of the syntax used in C# except for Console.WriteLine and ConsoleReadLine.
besides that, we haven't seen anything

I'm not trying to get anyone to write the code for me, i won't learn
anything
that way. It's pointless and wouldn't do me any good when it comes times
for exams. I do have plans to see a tutor at school on monday between
classes, so I'm hoping that will shed some more light on the subject.
 
I appreciate all the responses to my question. It does help a lot.
Especially the resources some of you have pointed out.
I even acknowledge the 'Get a life' quote.
heh
good to light a fire under one's ass from time to time ; )
 
Corey,
C# is really a lot like C++, whether you realize that or not. The process is more or less
the same as it would be in C++, though there are OBVIOUSLY differences. :)

As mentioned by another previously, start by writing the pseudocode for the assignment, once
you get that done, you'll have the basic framework from which to begin.


Here are a few reference articles that 'might' help:

http://www.cs-ipv6.lancs.ac.uk/acsp/CSharp/Exercises/Week1/
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=17

JPM
 
The CSC.exe from VisualStudio 6.0 will not work to
compile .Net languages. You will need the .Net Framework
SDK which includes its own verison of CSC.exe. I would
recommend that given the short time before the assignement
is due that you check out SharpDevelop which is a Free IDE
until you can either purchase VisualStudio.Net or decide
on some other IDE.

http://www.icsharpcode.net/OpenSource/SD/Default.aspx

Thanks,
Steven
 
Cory,
I'm a bit surprised that you've not been given more instruction on what to do here. DeVry
doesn't sound like a very high-quality education...Though this assignment may be more to see how
much logic you can apply to problem solving.

Good luck in your assignment!

JPM
 
Corey,
C# is not something that you just "plug" into Visual Studio 6, or pull file(s) from VS 6 to
run. C# is a totally new language, dependent upon a number of new architectural designs, mainly
the CLI (Common Language Infrastructure), along with many more.

C# and the CLI are an accepted standard under ECMA-334 and ECMA-335
(http://msdn.microsoft.com/net/ecma/). C# Language Specification located here
(http://www.ecma-international.org/publications/files/ecma-st/Ecma-334.pdf).

Good luck in your studies.

JPM
 
Thanks for the support, i've been plugging away at it today.
Haven't started the actual coding yet, just focusing on my logic
and how to do my 'for' loops to process and display the table.
i'll have to check with some of the higher term students for a few
other questions (converting the table to hex and the general form of how the
code should look)
otherwise, things are coming to me a bit better now. i was just out of the
loop for a while, having not done any programming for a few weeks.

I appreciate all the help and know where to turn in the future

Corey
 
DeVry is definitely a nice college, eh?

Corey Dyke said:
my semester started last monday. the assignment was givin on this past
wednesday. and we haven't had a class since then. he hasn't shown us any
of the syntax used in C# except for Console.WriteLine and ConsoleReadLine.
besides that, we haven't seen anything

I'm not trying to get anyone to write the code for me, i won't learn
anything
that way. It's pointless and wouldn't do me any good when it comes times
for exams. I do have plans to see a tutor at school on monday between
classes, so I'm hoping that will shed some more light on the subject.
 
it's a great place, very accelerated. i shouldn't be having as much trouble
as i am with C#, but i'm getting it more and more the more i look at it.
it's my own fault for not staying up to date on my C++ between semesters ; )
hehe
 
Just wanted to thank you all for the help, i got it done.
Took me about an hour and a half to get done.
I really appreciate everything.

Corey
 
Back
Top