[Solved] (SOLVED) Create a class that that contains five different methods

$25

File Name: (SOLVED)_Create_a_class_that_that_contains_five_different_methods.zip
File Size: 612.3 KB

SKU: [Solved] (SOLVED) Create a class that that contains five different methods Category: Tag:
5/5 - (1 vote)

Creating application classes is a basic skill for object-oriented software development. Your program cant create an object without a class to work from, and its the class that lends an object both its attributes and its methods. Thus, the class with its attributes and methods represents the first essential step in the object-oriented programming methodology. In this Assignment, you will create an application class that contains several methods.To complete this Assignment:Create a class that that contains five different methods.The first method should be named greeting() and should display a JOptionPane that is customised in the following ways (Figure 1):There should be no icon on this message box.The title bar on this message box should read Welcome!The message box should display Welcome to my program!Alert box with Welcome messageFigure 1The second method should be named getFirstNumber() and should display a JOptionPane that is customised in the following ways:There should be a question mark icon on this message box.The title bar on this message box should read First number?The message box should allow the user to input the first number.The third method should be named getSecondNumber() and should display a JOptionPane that is customised in the following ways:There should be a question mark icon on this message box.The title bar on this message box should read Second number?The message box should allow the user to input the second number.The fourth method should be named swapNumber() and should display JOptionPanes as follows:In this method, you need to swap the value of the first number with the value of the second number. You can think of some temporary variable to do the swapping. Here is an example of how swapping works:Before swapping:First = 10Second = 5After swapping:First = 5Second = 10The new value of first variable shall be incremented by 100, whereas the new value of second variable shall be incremented by 50.The method should first display a JOptionPane with an information icon that has Summary as the title bar text.This message box should display the first number (X) in the format The new value of first number is: X.The method should display another JOptionPane with an information icon that has Summary as the title bar text.This message box should display the second number (Y) in a similar format to the first message: The new value of second number is: Y.In order to accomplish this task, you will need to discover how to convert a string to an integer to perform the calculation.For all Assignments:Before uploading, test your code to be certain that it can perform the required task

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] (SOLVED) Create a class that that contains five different methods
$25