C
C#β€’14mo ago
kiteflora

❔ Help with homework coding 'project' due this Thursday

Hi allπŸ‘‹πŸ»πŸ‘‹πŸ», I'm a noob in programming & I have an urgent coding project in c# I have to complete by Thursday. I would appreciate a walk through/any help I can get please Please please. The solution doesn't need to be perfect but demonstrated use of BSTs and LinkedLists is important. Here it is 😊:
20 Replies
Pobiega
Pobiegaβ€’14mo ago
Since you've been on this discord for 6 months, you are probably aware that we will not do the assignment for you. What you need to do is ask specific questions where you are having problems
kiteflora
kitefloraβ€’14mo ago
Noted, I'll try and keep the thread active with questions as I try and implement what I can in the codeπŸ™
JakenVeina
JakenVeinaβ€’14mo ago
πŸ‘
Accord
Accordβ€’14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
kiteflora
kitefloraβ€’14mo ago
Hi, I've completed most of the trivial part of the code(BSTs & linked list) just need help developing the algorithm...In my head I'd approach it as an optimisation algorithm where for every instance of the console being opened a selected list of the quests is given and the program has to find the optimal use of them...That's it
Pobiega
Pobiegaβ€’14mo ago
Can you go into more details? You're correct in that it does seem to be an optimization problem (solving the most amount of quests using the limited list of raw materials)
kiteflora
kitefloraβ€’14mo ago
Hey, sorry for the late reply For a littlebackground, my class hierarchy (point 1) has seven classes, each containing several generic items I.e. class Household : IGenericItem{} (mother class) class Hairdryer: Household {} class: Fork: Household {}... and so forth -please note that I create the IGenericItem interface to be able to use it as a type to store items in ARRAYS to the various tools constructors (Other mother classes are Garage, HardwareStore, Kitchen, Bathroom, OfficeSupply & Garden, all with their respective item hierarchy and inherenting from the 'IGenericItem' interface) As asked for in the task, I have made a linked list of the Quests, using a class called QUESTS, for the quest instances themselves, & QUESTLIST to store instances of QUESTS in the LL. Please remember that the QUESTS constructor take a name in string form (e.g. "Kidnapping", "Hijacking", "Haunting"...) AND an integer value that describes the difficulty level(will be used in conjunction with the devices usefulness score) for the BST, I have a class called Device Description, it's constructor is as follows: (string name, int usefulness, IGenericItem[] components) and another called DeviceBST, the actual BST that stores the 'DeviceDescriptions". Because I was asked to use the number of unique items used for each device as the key for the elements, I decides to assign each device a different number of items (1,2,3,4,5,6,7,8,9,10,13). This was done by: 1. Instantiating EACH AND EVERY item with the default constructor; 2.creating the item arrays (IGenericItem[]) using the instantiated items 3.Calling the DeviceDescription constructor to create all the devices (there are 11) 4.Creating the BST (DeviceBST<int, DeviceDescription> McGuyverDevices = new Devices<int, DeviceDescription>();) ...I hope that describes my situation well πŸ™‚
kiteflora
kitefloraβ€’14mo ago
kiteflora
kitefloraβ€’14mo ago
...so for how to implement the whole thing, I envision the program/console selecting 3-5 random of the quests for every instance, and let's say, 5 random tools also (both printed to the console). Then the program has to use the tools to find the optimal way of completing the most amount of quests let's say I.e. if the quests have difficulty 5-5-10and the tools selected have usefulness scores of 10,5,8(no particular order), the optimal ORDER in which to use the tools would be 5,8,10 (we assume that the usefulness is 'used' up regardless if it exceeds the difficulty of the quest it was used for)
Pobiega
Pobiegaβ€’14mo ago
... I envision the program/console selecting 3-5 random of the quests for every instance, and let's say, 5 random tools...
Correct regarding the quests, incorrect regarding the tools, I think. Its rather supposed to generate a random list of available components in different numbers, and your program then has to try and solve as many quests as possible by constructing the most optimized list of tools based on what components were available.
kiteflora
kitefloraβ€’14mo ago
Meaning the code will generate the items, then decide which devices can be created from those...? ...issue is I've already assigned the items to their devices and it might complicate things further 🀯 ...but I'm open to your thoughts
Pobiega
Pobiegaβ€’14mo ago
I mean, I think thats literally the assignment. figuring out an algorithm that can decide what tools to create
Pobiega
Pobiegaβ€’14mo ago
Pobiega
Pobiegaβ€’14mo ago
read these two sections again it clearly says "raw materials" and "if ... cant complete any of the missions based on the generated raw materials..."
kiteflora
kitefloraβ€’14mo ago
You might have a point... In that case, I don't have to make the program select which quests to present to McGuyver each and every time, in the interest of not over-complicating things, I can just have raw materials and the tools/devices as the variables
Pobiega
Pobiegaβ€’14mo ago
as far as I understand, only the raw materials should be "randomized", thus limiting what tools can be made, thus limiting how many and what quests can be solved and the goal is to solve the highest possible number of quests, by cleverly picking what tools to make
kiteflora
kitefloraβ€’14mo ago
Do you have any code in mind?
Pobiega
Pobiegaβ€’14mo ago
No, I do very little algo stuff.
kiteflora
kitefloraβ€’14mo ago
Currently feeding chatGPT with some prompts xd Might be my only option
Accord
Accordβ€’14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.