Tutoring for C# in College
Hello, I am looking for someone to help tutor me on my assignments in my C# course for my college.
89 Replies
consult rule 6
besides that, you probably won't find a 1 on 1 tutor here but you can just make help posts and people will help
im just tryna not fail and my college doesnt offer tutoring for this 😦
well, it'll be harder to get help if you get banned for breaking rules :when:
that... and what exactly do you mean by tutoring?
We're not in the business of helping to cheat on assignments here, but we do offer help in understanding the problem and how to approach a solution, if there is some effort shown by the student.
If you have any specific questions, feel free to ask
just help understanding the assignments and being explained wtf im doing. the book used is kind of out of order for what we are learning so you have to sift thru to get all the information which takes very long for me haha
Thats fine to ask here about tbh
just make a thread like you did now. Include as much details as possible, like what part in particular you dont understand, what you have tried, etc
and don't offer payment, because again, against the rules (you should delete that part of your message)
i just dont learn this crap by myself well and really just need someone to explain it to me im not asking for them to do it and turn it in just explain the what and why
lots of people here are willing to do that for free
well thank you for the advice, I'll try posting another assignment. I'm sure its all very elementary to most on here
Don't forget, ChatGPT is also helpful. 🙂
Eh
Chat GPT is helpful when you know how to tell that its output is bullshit
chatgpt is not helpful to beginners
it's a trap
ok so just abt that, I either dont know wtf im doing so bad that the order in which i place on the design and them code in form 1 is wrong or chat gpt 4.0 is legit lobotomized
Im a GIS major and I NEED to pass this to graduate and them i only have a database class left man
So what is the assignment problem?
I am making a discount table essentially, the instructions are straightforeward i guess
2 labels, 2 textboxes, 1 button, and a listbox the discount percentages are 1-5 items: no discount, 6-10: 5%, 11-20: 10%, 21+: 20%. my prof added a statement saying valid ranges of numbers are anything greater than 0 and less than 100. im just assuming he wants to ensure we do not try and use negatives somehow?
I have the tools set on the design sheet albeit they are probably not very presentable.
so an input textbox, a discount selection (listbox) and when you press the button, it shows you the new total price with the discount applied in the "result" textbox?
yea thats the gist the instructions given on that front are as follows: When the button is clicked, the code will loop through the values, skipping odd numbers, beginning with the start value and ending with the end value, inclusive. Each time through the loop, the current value of the loop control variable will be tested to see what discount is relevant and will add a string to the listbox of the form current_value has a XXX percent discount. Where current_value is the current value of the loop counter and XXX is a calculated discount.
i only copy n paste that to ensure the entirety of this assignment is known
loop through the values?
no freaking clue
what values? you have one input?
Post the original problem sheet, possible?
sure, here is the whole set. In this assignment, you will write a program that prints a discount table. The output will be directed to a list box. Your interface will be a windows form that contains:
Label - Start Value:
Textbox - start_value
Label - End Value:
Textbox - end_value
Listbox - discount_table_list
Button - Display Table (Name: display_table)
When the button is clicked, the code will loop through the values, skipping odd numbers, beginning with the start value and ending with the end value, inclusive. Each time through the loop, the current value of the loop control variable will be tested to see what discount is relevant and will add a string to the listbox of the form current_value has a XXX percent discount. Where current_value is the current value of the loop counter and XXX is a calculated discount.
Here are the discount percentages:
1 - 5 items - no discount
6 - 10 items - 5%
11-20 items - 10%
21+ items - 20%
Valid ranges of numbers are anything greater than 0 and less than 100. Try different ranges and see how it works.
Zip up all of the files and folders of your solution, typically, in /Users/yourname/source/repos/yoursolution. Submit it here. We will grade it in class on Tuesday. Be prepared to download the zip file and share it with one of your peers for grading.
@always use bool? as primary keys Remember - no spoonfeeding. Otherwise go ahead.
It looks like a piece of cake.
im not asking anyone to do this for me per say but some guidance on what steps to take to get it done would be greatly appreciated. it may be hard to not "spoonfeed" me bc im very very green to this tbh so im sorry if that is the case haha
not a very helpful thing to say to someone who is asking for help with it
ah, so there are two inputs, a start and an end.. and you have to loop over that range.
okay that makes sense.
as i stated im sure this is very very easy to those that are not me and i take no offense by that
im j tryna get ajob where i make my silly little maps man 😦
how far did you get in terms of those instructions you shared?
rather, what's the first thing that's confusing about it
ok that problem description is... not great, but its somewhat understandable. My initial guess was way off.
well like i said, i have all the tools set on the design sheet but im not sure where the coding starts and what to set up for the tools on my form1, basically the important stuff lol
Read the instructions again. Whats the first step?
After adding the controls, that is.
when the button is clicked, the code will loop through the values, so i either start on the button or i start by setting up the discount values?
you can break that line down even further into smaller steps
i asked chat gpt for the code and it gave me this earlier as well: private void display_table_Click(object sender, EventArgs e)
{
discount_table_list.Items.Clear(); // Clear the ListBox
if (int.TryParse(start_value.Text, out int start) && int.TryParse(end_value.Text, out int end))
{
if (start > 0 && end < 100 && start <= end)
{
for (int i = start; i <= end; i++)
{
if (i % 2 == 0) // Skip odd numbers
{
string discountMsg = $"{i} has a {GetDiscount(i)} percent discount.";
discount_table_list.Items.Add(discountMsg);
}
}
}
else
{
MessageBox.Show("Please enter valid start and end values (greater than 0 and less than 100).");
}
}
else
{
MessageBox.Show("Please enter numeric values for start and end.");
}
}
private string GetDiscount(int value)
{
if (value >= 1 && value <= 5) return "no";
else if (value >= 6 && value <= 10) return "5%";
else if (value >= 11 && value <= 20) return "10%";
else return "20%";
}
now why would you go and ask chatGPT for the answer?
do you think that helps you understand it at all?
oh absolutely not. I only gave what it said to you guys to show what gpt says
im very aware how unhelpful it is i only pasted it for the code part but i doubt it works
(we don't care what chatgpt says fwiw)
^
even if the code solves the problem it's not usually good, and it skips over the whole learning process that the assignment is trying to teach you
i can get that
if your first instinct is to ask chatgpt, you are not going to learn anything at all.
fair
so can you, without any form of AI help, break down the line
when the button is clicked, the code will loop through the valuesthe most basic breakdown here would result in at least 4 "things" can you give it a try?
the button is supposed to correlate to the list, where the values are kept? is that right?
no
where are the values from?
well shit
if not the list then its either the labels or do i make a class?
mate
read
im sorry if this is making u deadpan
Label - Start Value: Textbox - start_value Label - End Value: Textbox - end_valueWhat is a label? what is a textbox?
well a label is used to describe a textbox or object so im wrong there, and a textbox is used to input
mhm
and if one is called "start value" and the other is called "end value"...
what do you have?
so the start value is where the number of items is inputted, and the end value is supposed to be the discount?
read the prompt very closely
it tells you exactly how the start value and end value should be used
are you familiar with the concept of a "range of values"?
not how it would be defined in C#, other than that it would be a set of numbers in this case 0-100
so if you have two input boxes, that the user can type stuff into...
and you need a range of values....
....
focus on this part of the prompt
try writing the code for just that part first
or at least break it down into steps of what the code would need to do
this stuff makes me feel like i have an IQ of 25.
hang on im trying here sorry
think out loud 🙂
Time for rubberducking
start value
end value
for the fucking
range
there ya go
god
im very much and illustrated learner. v hindering w some things
an*
correctly determining requirements is usually more work than writing the actual code
that reminds me, i have some painful meetings to schedule
again, doesn't help anyone here
ok ok ok. start value is the beginning input of items, end value is the ending input of items, listbox displays the discounts, the button is essentially used like a calculate button on a calculator?
yes.
the listbox displays your "results" thou
i mean it helped me tbh bc i can see and interpret
yea thats what i was trying to say thank you
so, to display the discount....I would make the discount percent correlate to the listbox?
?
its also the wrong place to start
Jimmacle
focus on this part of the prompt
Quoted by
<@105026391237480448> from #Tutoring for C# in College (click here)
React with ❌ to remove this embed.
oh opps
When you cook, do you start by letting it simmer, or do you usually cut your vegetables first?
you cant just "jump" to the middle/end of the problem
you need to work your way there first
ok fair, so do I start with the button? or do i start with the textbox values?
what do you mean by "start with the textbox values"?
go make your own discord server @always use bool? as primary keys
leave this one
by no means am i asking for this to be done while i watch but im ngl i lose hella brain cells learning this stuff so it being explained to me would help more than hinder
im not asking for it to be doenw hile i follow along on a stream or sum haha
you have to do the problem solving yourself
otherwise you will not learn
is c# like HTML where what is on the design sheet has to be coded in the order it appears on the design sheet?
no.
code executes in the order its written inside a method, but methods can be called in any order
and when visually designing forms with winforms, order doesnt matter
alrighty
Instruction flows from top to bottom unless there are conditional and jumping statements (like
if
, continue
, goto
, etc).so i start w the button.
Its the only reasonable place to put all your code, yes.
🫡
@TrippyBlu so you are done?
why bother them when they're presumably still working on it?
they'll be back when they need more help
something came up and I had to leave my computer unfortunately but its important thank you all for the help i will try adn come back when i can. I have till next monday to get it figured out!