Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Note: This code uses the advanced SetEffecto function allowing the user to use t

ID: 3600036 • Letter: N

Question

Note: This code uses the advanced SetEffecto function allowing the user to use the last parameter to set the start measure of the effect. 1 from earsketch import * 3 init 4 setTempo(117) 6 fitMedia(RD_TRAP_ARPBLEEPLEAD_1, 1, 1, 5) 7 setEffect(1, VOLUME, GAIN, -20, 1) 8 fitMedia(RD_TRAP_BASSDROPS_1, 2,1, 5) 9 fitMedia(RD_TRAP_DRUM_PART_1, 3,1, 5) 10 11 fitMedia(RD_TRAP_BELLLEAD_1, 1, 5, 9) 12 setEffect(1, VOLUME, GAIN, -10, 5) 13 fitMedia(RD-TRAP-DARKPAD-1, 2, 5,9) 14 fitMedia(RD_TRAP_DRUM_PART_4, 3, 5, 9) 15 16 fitMedia(RD_TRAP_ARPBLEEPLEAD_1, 1, 9, 13) 17 setEffect(1, VOLUME, GAIN, 0, 9) 18 fitMedia(RD_TRAP_BASSDROPS_1, 2, 9, 13) 19 fitMedia(RD_TRAP_DRUM_PART 1, 3, 9, 13) 20 21 fitMedia(RD_TRAP_BELLLEAD_1, 1, 13, 17) 22 setEffect(1, VOLUME, GAIN, 10, 13) 23 fitMedia(RD-TRAP-DARKPAD-1, 2, 13, 17) 54 24 fitMedia(RD_TRAP_DRUM_PART_4, 3, 13, 17)

Explanation / Answer

class String {
public:
String        ();                         //Empty string
String        (char);                     //Stirng('x')
String        (const char[]);             //String("abcd")
char&   operator[]    (int);                      //Accessor/Modifier
char    operator[]    (int)                const; //Accessor
int     capacity      ()                   const; //Max chars that can be stored (not including null terminator)
int     length        ()                   const; //Number of char in string
String operator+     (const String&)      const; //Concatenation
String& operator+=    (String);                   //Concatenation
bool    operator==    (const String&)      const;
bool    operator<     (const String&)      const;
String substr        (int, int)           const;
int     findch        (int, char)          const;
int     findstr       (int, const String&) const;

friend std::istream& operator>>(std::istream&, String&);
friend std::ostream& operator<<(std::ostream&, const String&);

private:
char str[STRING_SIZE];
};

String operator+       (const char[], const String&);
String operator+       (char,          const String&);
bool    operator==      (const char[], const String&);
bool    operator==      (char,          const String&);
bool    operator<       (const char[], const String&);
bool    operator<       (char,          const String&);
bool    operator<=      (const String&, const String&);
bool    operator!=      (const String&, const String&);
bool    operator>=      (const String&, const String&);
bool    operator>       (const String&, const String&);

#endif

Makefile

###############################################################
# String & Oracle
#
# CS II Kent State University
# Make file for string class and testing oracle
# J. Maletic Fall 2017
#
#

###############################################################
# Variables
CPP     = clang++
OPTIONS = -g -Wall -W -Wunused -Wuninitialized -Wshadow -std=c++11


# Names of your test files - add them in as you build them.
# Names must start with "test_"
MYTESTS = test_default_ctor test_c_str_ctor
#test_ctor_charArray


# Names of test files (include or exclude ones you don't want) testoracle_split
CTOR = testoracle_ctor_default testoracle_ctor_char testoracle_ctor_charArray
REL = testoracle_equal testoracle_lessThan
COPY = testoracle_ctor_copy testoracle_assign testoracle_ctor_charArray_int testoracle_ctor_int testoracle_swap_assign
OPS = testoracle_concat testoracle_subscript testoracle_len_cap testoracle_input testoracle_find_char testoracle_find_string testoracle_substring

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote