Create a directory called “TestClassValue” Hereafter, we call this directory <dir>. Create a Java class com.work.sample.FlawedClass in directory <dir>/src. (The actual path will obviously reflect the package structure.) 100% Branch Coverage & 100% Statement Coverage Add to the class a method called flawedMethodl that contains a division by zero fault such that it is possible to create a test suite that achieves 100% branch coverage and does not reveal the fault every test suite that achieves 100% statement coverage reveals the fault. Conversely, if you were able to create the method, then create two JUnit test classes com.work.sample.FlawedClassTestBCl and com.work.sample.FlawedClassTestSCl for class FlawedClass as follows: FlawedClassTestBCl should achieve 100% branch coverage of flawedMethodl and not reveal the fault therein. FlawedClassTestSCl should achieve 100% statement coverage of flawedMethodl and reveal the fault therein. Both classes should be...
Relational Algebra A database records information about athletes competing at the Olympics. An athlete competes for a particular country in one or more events. Events take place at a scheduled day and time in a particular venue. The result (rank) is recorded for all athletes in the final of the event. The medal (gold, silver or bronze) is also recorded for the medal winners in the event. Note that we are not considering team sports or heats in this example – only individuals competing in the finals. The schema for this database is as follows: (Note that primary keys are shown underlined, foreign keys in bold). ATHLETE ( AthleteNo , AthleteName, CountryName) COUNTRY ( CountryName , NumberOfCompetitors) EVENT (EventName, ScheduledStart, VenueName ) VENUE (VenueName, City, Capacity) FINAL ( AthleteNo , EventName , Rank, Medal) Provide relational algebra (NOT SQL) queries to find the following informaList the name and country of all athletes. List the event name and scheduled...
Comments
Post a Comment