Computers and Technology
Given main() and the instrument class, define a derived class, stringinstrument, for string instruments.ex. if the input is:drumszildjian20152500guitargibson20021200619the output is:instrument information: name: drums manufacturer: zildjian year built: 2015 cost: 2500instrument information: name: guitar manufacturer: gibson year built: 2002 cost: 1200 number of strings: 6 number of frets: 19//main.cpp#include "stringinstrument.h"int main() { instrument myinstrument; stringinstrument mystringinstrument; string instrumentname, manufacturername, stringinstrumentname, stringmanufacturer, yearbuilt, cost, stringyearbuilt, stringcost, numstrings, numfrets; getline(cin, instrumentname); getline(cin, manufacturername); getline(cin, yearbuilt); getline(cin, cost); getline(cin, stringinstrumentname); getline(cin, stringmanufacturer); getline(cin, stringyearbuilt); getline(cin, stringcost); getline(cin, numstrings); getline(cin, numfrets); myinstrument.setname(instrumentname); myinstrument.setmanufacturer(manufacturername); myinstrument.setyearbuilt(yearbuilt); myinstrument.setcost(cost); myinstrument.printinfo(); mystringinstrument.setname(stringinstrumentname); mystringinstrument.setmanufacturer(stringmanufacturer); mystringinstrument.setyearbuilt(stringyearbuilt); mystringinstrument.setcost(stringcost); mystringinstrument.setnumofstrings(numstrings); mystringinstrument.setnumoffrets(numfrets); mystringinstrument.printinfo(); cout
Problem 3. Consider finite strings over the alphabet = {a, b, c, d}. The power operation represents string repetition, for example a 3 b 4 c denotes the string aaabbbbc. Define a contextfree grammar G generating the language L(G) = {w|(i, j, k)w = a i b (i+j+k) c jd k}, the set of words where the number of bs is the same as the number of all other letters together and the letters are ordered alphabetically. For example, the words ab, aaabbbbd, abbbcd belong to the language, words abba, aabbbbbc, abc do not belong to the language. Justify your answers
Assignment 10: create a song of the summer in earsketch !!! I NEED AN ANSWER ASAP!!! REQUIREMENTS:For this assignment, you will code three songs in EarSketch, each incorporating the following Python commands:You must require and utilize input from a user using the EarSketch AP function readInput(). This should prompt users to select the genre they want to listen to, and once selected, should play one of your three songs that matches the genre chosen.You must use some form of randomization in your songs, using the randint() function.You must use a conditional statement in your songs, using an if, else, elif statement.You must use both of the EarSketch functions fitMedia() and setEffect() for an effect in your script (such as a fade or distortion).You must use string operations (concatenation or splicing) to create your own beat, using the EarSketch function makeBeat().You must use for loops to add repetition to your code.You must use at least one user-defined (custom) function to create musical sections for your songs.In addition to the required coding components above, your program must also meet the following general requirements: Each song must be at least 16 measures long.Each song should have at least three tracks.Each song should include different elements unique to a music genre (different beats, instruments, or sound clips that would allow a listener to tell songs apart from one another).Each song should include a sound clip from Ciara or Common, found in the EarSketch library.You will need to create a new script for your code in your EarSketch account, title it appropriately, and use sound clips from the EarSketch library or sounds you have recorded or uploaded on your own. Your final code will need to run without any errors, and play successfully in the digital audio workstation (DAW) when opened by your teacher.ASSIGNMENT BENCHMARKS:Write the script for your songs, based on the assignment requirements. Make sure that each of the following statements is true of your code:My code asks for input from the user using readInput(), and uses that user input to change the song that is played when the program is run.My code uses the randInt() function to create randomization.My code uses a conditional statement (if, else, or elif statement).My code uses the fitMedia() function at least once.My code uses the setEffect() function at least once.My code uses a string operation and the makeBeat() function to create a custom beat.My code uses at least one for loop.My code uses at least one user-defined (custom) function.My code has three unique songs.Each of my three songs is at least 16 measures long.Each of my three songs has at least 3 tracks.Each of my three songs includes a sound clip from Ciara or Common, found in the EarSketch library.