1. Draw a use case diagram for an ATM system with the following functionalities. A customer’s interaction with the system involves logging in, making withdrawal requests, deposit requests, and balance inquiry requests. If the customer logs in, there is a possibility that the system will confiscate (seize) the card (for example, if the login is incorrect for three times). Card confiscation involves triggering an alert, which will be received by the branch manager of the bank. If the customer does a balance inquiry, this causes the system to check the balance. Checking the balance is also done when the customer requests a withdrawal, since the system must verify that enough money is in his / her account. In principle, checking the balance is a function that may be performed to support many use cases throughout the system.

2. Referring to question 1, suggest TWO classes that may exist in the ATM system. Attributes, operations, and association should also be shown in your examples.

3. We plan to develop a music player (software) for a portable device (e.g., PDA). It allows the user to play the song files that are stored in the device. Each song file can be described by a song name, an audio format and the play-length. The control panel of the music player contains five buttons: (i) OPEN, (ii) PAUSE, (iii) STOP, (iv) LOUDER, and (v) SOFTER. Initially, the music player stays at the idle state. While being idle, it allows the user to adjust the volume level. If the user presses LOUDER, then the volume level increases by 1. If the user presses SOFTER, then the volume level decreases by 1. When the user presses OPEN, the player asks the user to enter a song name. Next, the player searches for the song and checks the audio format of the song. If the song exists and its audio format is valid, then the player starts playing the song (i.e., delivering music to the user). Otherwise, the player displays an error message, and asks the user to select a song again. While the song is being played, the user may press STOP so that the player stops playing the song and becomes idle again. The user may also press PAUSE to suspend the playing, which can then be resumed after the user presses PAUSE again. After playing the whole song, the player becomes idle.

a. Draw a state transition diagram for operations of the music player described above.

b. Based on the description above, draw a sequence diagram for the success scenario that the user selects a (valid) song and the player plays the whole song. In this scenario, the user does not press any PAUSE or STOP buttons. (15 marks) Note: Your sequence diagram should have: the actor (i.e., user), the music player, and a song.

4. Referring to Question 2 in Exercise 1.1, write the C++ codes for the TWO classes with related attributes and operations. Submit your compilable C++ code file in .cpp

5. Referring to your compilable C++ codes in Question 4, vertify the C++ codes from the perspectives of type checking, style checking, and input validation. Describe the results

6. What is an integer overflow in programming? Conduct your own research and explain it with an illustrative example in C++

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.