This is C++. Please upload all code with comments. Also with all names of file o
ID: 3587406 • Letter: T
Question
This is C++. Please upload all code with comments. Also with all names of file of code
Recall that a list is a collection of elements of the same type. However, in a list an element may repeat. That is, the elements of the list need not be distinct. On the other hand, a set is also a collection of elements of the same type. However, the elements of a set are distinct. It follows that a set is a list with distinct elements. In this section we designed the class unorderedArrayListType to process unordered lists. Note that the functions insertAt and insertEnd do not check whether the item to be inserted is already in the list. Similarly, the function replaceAt, does not check if the item to be replaced is already in the list. Just as you can design a class to manipulate lists, you can also design a class to manipulate sets.
Design the class unorderedSetType, derived from the class unorderedArrayListType, to manipulate sets. Note that you need to redefine only the functions insertAt, insertEnd, and replaceAt. If the item to be inserted is already in the list, the functions insertAt and insertEnd output an appropriate message. Similarly, if the item to be replaced is already in the list, the function replaceAt outputs an appropriate message.
The elements of an unorderedSetType object are distinct, but in no particular order. Design the class orderedSetType, derived from the class orderedArrayListType, to manipulate ordered sets. The elements of an orderedSetTypeobject are distinct and in ascending order. Note that you need to redefine only the functions insert and replaceAt. If the item to be inserted is already in the list, the function insert outputs an appropriate message. Similarly, if the item to be replaced is already in the list, the function replaceAt outputs an appropriate message.
Write one or more programs to test your new classes. Turn in all your header files, your implementation files, and your test programs. Also turn in one or more screen shots showing the results of your testing.
After completing this project you will demonstrate that you are able to utilize the principal of inheritance to simplify the development of new classes.
Explanation / Answer
var webdriver fx = require('selenium-webdriver'), By = webdriver.By, until = webdriver.until; var driver_fx = new webdriver.Builder() .forBrowser('firefox') .build(); var driver_chr = new webdriver.Builder() .forBrowser('chrome') .build(); searchTest(driver_fx); searchTest(driver_chr); function searchTest(driver) { driver.get('http://www.google.com'); driver.findElement(By.name('q')).sendKeys('webdriver'); driver.sleep(1000).then(function() { driver.findElement(By.name('q')).sendKeys(webdriver.Key.TAB); }); driver.findElement(By.name('btnK')).click(); driver.sleep(2000).then(function() { driver.getTitle().then(function(title) { if(title === 'webdriver - Google Search') { console.log('Test passed'); } else { console.log('Test failed'); } }); }); driver.quit();
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.