This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const client = new ApolloClient({ | |
| link, // httpLink | |
| cache, | |
| resolvers | |
| typeDefs, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const client = new ApolloClient({ | |
| link, // httpLink | |
| cache, | |
| resolvers: StateResolvers(getState, writeState), | |
| typeDefs, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Bot{ | |
| constructor(name, role, relaxTime){ | |
| this.name=name; | |
| this.role=role; | |
| this.relaxTime=relaxTime; | |
| } | |
| print(){ | |
| console.log("name:" +this.name + " relaxTime: " + this.relaxTime); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Bot{ | |
| constructor(name, role, relaxTime){ | |
| this.name=name; | |
| this.role=role; | |
| this.relaxTime=relaxTime; | |
| } | |
| print(){ | |
| console.log("name:" +this.name + " relaxTime: " + this.relaxTime); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Manager_Proxy = require('./proxy'); | |
| const Fiona = new Manager_Proxy(); | |
| const token= "afaf13441" | |
| let report = Fiona.getReport(1,token); | |
| console.log(report); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Manager = require('./BotManager'); | |
| const authentication = require('./Authentication') | |
| class Manager_Proxy{ | |
| constructor(){ | |
| this.chached_reports = new Map(); | |
| } | |
| getReport(id,token){ | |
| let valid = authentication.authenticate(token); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // old rental interface | |
| function OldKayakRentals(){ | |
| this.request= function(name, time){ | |
| // rental quotation calculations | |
| return 30; | |
| } | |
| } | |
| // new rental interface | |
| function NewKayakRentals(){ | |
| this.name = function(name){/* set name of renter */} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const BotBuilder= require('./BotBuilder'); | |
| //developers | |
| const Elsa = new BotBuilder('Elsa').makeDeveloper().setRelaxTime(100).makeItSing().build(); | |
| const Steven = new BotBuilder('Steven').makeDeveloper().setRelaxTime(200).build(); | |
| //testers | |
| const Maddie = new BotBuilder('Maddie').makeTester().setRelaxTime(200).makeItSing().build(); | |
| const Sanjiti = new BotBuilder('Sanjiti').makeTester().setRelaxTime(400).build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Bot{ | |
| constructor(builder){ | |
| this.name=builder.name; | |
| this.role=builder.role; | |
| this.relaxTime=builder.relaxTime; | |
| this.canSing=builder.canSing; | |
| } | |
| //rest of Bot methods | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const botFactory= require('./botFactory'); | |
| let Eve= botFactory('eve','developer',100); | |
| let Adam= botFactory('adam','tester',200); |