1. Engineering
  2. Computer Science
  3. software engineering question answer carefully and completely for a thumbs...

Question: software engineering question answer carefully and completely for a thumbs...

Question details

Software Engineering Question

Answer carefully and completely for a thumbs up

Need HELP with part (b) mainly.

Question 2 (a) The Card class represents a playing card, like that shown below. The CardCollection class represents a collection of cards. It has a method add, which adds a card to the collection. The PokerHand class is a kind of card collection that knows some of the rules of the game of Poker. It has a method called isFlush that returns true if the hand of cards is a Flush (all cards of the same suit-e.g., all Clubs, like the card shown above) Draw the UML class diagram implied by the statements above (b) A system has a feature in which data are downloaded from a web site using HTTP and then stored in an SQL database. The developer shows you the unit tests he has written for this system. One of them tests downloading by creating a socket and interacting with a server on the internet. The other performs an SQL update against a locally- running instance of MySQL, followed by a query to check that the data have been stored correctly Explain why these should not be regarded as good unit tests. Suggest improvements that could be made so they will work better as unit tests. (c) Suppose you are developing a class called Dataset, which stores a collection of int values. The class has a default constructor and an add method with a single int parameter, representing a value to be added to the dataset. The class also has a method called minimum, which returns the minimum of the values in the dataset. This method should throw an instance of exception class DataException if the dataset is empty Write down the code for two JUnit test methods that, together, would be suitable for testing minimum.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution