Click here to Skip to main content
15,886,017 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Update Google chart with dynamic data. Pin
ZurdoDev7-Aug-18 4:47
professionalZurdoDev7-Aug-18 4:47 
QuestionIssue With JavaScript and ClearScript Pin
Alan Burkhart13-Jul-18 13:10
Alan Burkhart13-Jul-18 13:10 
AnswerRe: Issue With JavaScript and ClearScript Pin
Graham Breach14-Jul-18 2:07
Graham Breach14-Jul-18 2:07 
GeneralRe: Issue With JavaScript and ClearScript Pin
Alan Burkhart14-Jul-18 3:49
Alan Burkhart14-Jul-18 3:49 
QuestionJavaScript Pin
Member 99702028-Jul-18 20:15
Member 99702028-Jul-18 20:15 
AnswerRe: JavaScript Pin
Member 997020210-Jul-18 4:44
Member 997020210-Jul-18 4:44 
QuestionNeed some help with app, please. Pin
Member 1388357522-Jun-18 12:03
Member 1388357522-Jun-18 12:03 
AnswerRe: Need some help with app, please. Pin
Nathan Minier25-Jun-18 1:49
professionalNathan Minier25-Jun-18 1:49 
So for starters, utilize the code that you've already written or else you're wasting everyone's time. You already put assignment assessors in the base class constructor, so use them:
JavaScript
class Result extends List { 
   constructor(date, amount, currency, product) {
      super(date, amount, currency, product);
   } 
}
That said, I think that you haven't considered the problem properly, and that polymorphism is not an appropriate approach to this problem. If you look at the problem, it seems much more likely that a better approach might be enumeration. If you're learning software development, understanding the appropriate tools at your disposal and when to use them is important.

Next you need to logically decompose your problem. In the real world this involves what is known as the "Analysis" phase of engineering, where requirements are parsed into application states and workflows (among other possible architectural artifacts). In this case, though, your professor has been good enough to give you a set of specifications! You can directly code the requirements that s/he has provided as class members. Let's expand the example to demonstrate that:
JavaScript
class MyList{
   // not demonstrating constructor and base members
   // this is your homework, not mine :)

   add(date,amount,currency,product){
      /*method implementation*/
   }

   list(){
      /*method implementation*/
   }

   clear(date){
      /*method implementation*/
   }

   total(currency){
      /*method implementation*/
   }
}

If you need help with specifics when you have a model, feel free to ask, but no one on this site will just do the homework for you.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli

QuestionCreating hexbins visualisation with mapbox in an angular 4 project Pin
Member 1387271014-Jun-18 2:35
Member 1387271014-Jun-18 2:35 
QuestionJavascript function - onclick problem Pin
Member 201089711-Jun-18 16:23
Member 201089711-Jun-18 16:23 
AnswerRe: Javascript function - onclick problem Pin
Member 1387615717-Jun-18 19:57
Member 1387615717-Jun-18 19:57 
GeneralRe: Javascript function - onclick problem Pin
Richard MacCutchan17-Jun-18 21:49
mveRichard MacCutchan17-Jun-18 21:49 
Questionnot work onClick operation Pin
Member 1382834015-May-18 6:29
Member 1382834015-May-18 6:29 
SuggestionRe: not work onClick operation Pin
Richard Deeming15-May-18 9:10
mveRichard Deeming15-May-18 9:10 
GeneralRe: not work onClick operation Pin
Shivnandan singh25-May-18 0:31
Shivnandan singh25-May-18 0:31 
AnswerRe: not work onClick operation Pin
Shivnandan singh25-May-18 0:32
Shivnandan singh25-May-18 0:32 
GeneralCall jquery function after partial view page return. Pin
Rahulgupta.hanu14-May-18 3:28
Rahulgupta.hanu14-May-18 3:28 
GeneralRe: Call jquery function after partial view page return. Pin
CP_Member88829-Jul-18 19:32
CP_Member88829-Jul-18 19:32 
QuestionJava script and SQL Pin
Johannes Moolman7-May-18 23:04
Johannes Moolman7-May-18 23:04 
AnswerRe: Java script and SQL Pin
W Balboos, GHB9-May-18 8:54
W Balboos, GHB9-May-18 8:54 
QuestionMVVM knockoutjs Grid Pin
padav146-May-18 0:01
padav146-May-18 0:01 
AnswerRe: MVVM knockoutjs Grid Pin
Afzaal Ahmad Zeeshan6-May-18 3:04
professionalAfzaal Ahmad Zeeshan6-May-18 3:04 
QuestionBeginner, no pc Pin
Rufus1827-Apr-18 0:29
Rufus1827-Apr-18 0:29 
AnswerRe: Beginner, no pc Pin
F-ES Sitecore27-Apr-18 1:54
professionalF-ES Sitecore27-Apr-18 1:54 
GeneralRe: Beginner, no pc Pin
Anushkasharma1021-Jun-18 3:42
Anushkasharma1021-Jun-18 3:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.