moshimoshi
Explore posts from servers❔ Help needed to fix ASP.NET syntax errors
Hi all, I'm currently doing a project for ecommerce site, and have encountered multiple bugs while debugging and have been stuck on it as i'm not sure how to fix them.
The issue is with the check out page, the quantity toggle buttons work ok but the trash can to delete each row and 'remove all' button which deletes everything in the cart at the top doesnt work. when i tried debugging, these are the errors shown (Apologies if context is not set very clear as i am super new to ASP.NET):
The issue is with the check out page, the quantity toggle buttons work ok but the trash can to delete each row and 'remove all' button which deletes everything in the cart at the top doesnt work. when i tried debugging, these are the errors shown (Apologies if context is not set very clear as i am super new to ASP.NET):
13 replies
✅ Binary Search Tree
https://www.hackerearth.com/practice/data-structures/trees/binary-search-tree/practice-problems/algorithm/monk-and-his-friends/
Hi guys, can someone pls help me out with understadning this question?
2 replies
✅ Finding node in binary search tree
Hi can someone help me understand the syntax of this code - I am struggling with understanding why we need to define the instance of current node in the iterative method but dont need to do so in the recursive method.
Thanks! 🙂
1 replies
✅ Algorithm analysis
Can someone help me understand how we got this formula to calculate time efficiency from this code?
this is the formula: f(n) = n2/2 + n/2, which is O(n2)
The formula goes like this, 1 + 2 + 3 + 4 + ... + N but i have no idea how to connect the dots. Thanks!
17 replies
❔ inheritance??
Is this an inheritance problem statement? Im not sure how to implement it...
You are tasked with designing a database for an online radio station. The database should keep track of songs, their artists, their length in seconds, and the number of times they have been played. It should also keep track of the names of the radio stations that the songs have been played on.
Your program should be able to perform the following operations:
Add a song to the database. A song should have a title, an artist, a length in seconds, and the number of times it has been played.
Add a radio station to the database. A radio station should have a name.
Add a playlist to the database. A playlist should have a name and a list of songs.
Add a song to a playlist.
Print the total length of a playlist in a human-readable format (hours, minutes, seconds).
Print the total number of times that a song has been played.
Print a list of all songs that have been played on a given radio station.
Print a list of all songs that have been played on multiple radio stations.
Print a list of all artists that have had songs played on a given radio station.
Print a list of all songs that are longer than a given length in seconds.
The program should be written in C# using object-oriented programming principles, with appropriate classes and inheritance relationships. The code should be well-structured, readable, and maintainable.
2 replies
❔ Classes and objects
Hi guys, I need help solving this problem: Write a class to model a Lamp.
Provide the following methods in your class:
a) turnOn – turn ON the lamp
b) turnOff – turn OFF the lamp
c) showCurrentColor – outputs current color of lamp
Each time the lamp is turned ON, it shows a different color. The changing
color-sequence is Red, Green, Blue, then loops back to Red and so on.
The state of the lamp is initially OFF. When the lamp is turned ON for the
first time, its color should be Red.
Note that the lamp cannot be turned ON if it is already ON. Its state
needs to be OFF before a call to turnOn() has any effect.
Test that your lamp exhibits the correct color-changing order by turning
it ON and OFF 10 consecutive times.
I am stuck here, not sure how to proceed...
16 replies