Monday, February 11, 2019

Essay --

1.Task Write the title or the encipher of exercises that take in to be deald (e.g. Lab Exercise 1)Lab Work 12. physical objectives List the objectives of doing the exercise2.1. To learn how to use the array list 2.2. get to a generic class of Array list of 30 hotels 2.3.To complete Hotel ADT class 2.4 To divulge the name of all hotels and their location2.5 Calculate and display the number of room for each Hotel that input by user3. algorithmic rule and introductionWrite the steps to solve the problem and/or the design of the solutionHotel-s give away String-sDistrict String-iNumRoom int+Hotel()+Hotel(String,String,int)+getData(String,String,int) void+getName() String+getDistrict() String+getNumRoom() int+getCalculateTax() two-bagger+isLarge() boolean+display() StringDemo Hotel Flow Chart START contract bridge of all variable sName,sInput, sDistrict,iNumRoom,bIsLarge,str Instantiate the ArrayLists object ArrayListhotelList = new ArrayList(30) Create Object Hfor(int iNo = 1 iNo Ask user to use JoptionPaneEnter Hotel Name Enter district of hotel Enter room number The Hotel is large? ( yes / no ) for(int iIndex = 0 iIndex System.out.println(display()) END4.Code listings and output evidence Program code and ... ....String)4.Method setData in Class Hotel cannot be applied to given types6. sum up time (hours) taken to complete the exercise Write the actual hours you took to do the exercise 5 hours7.Comments of the easiness or difficulties or experience in finish the exercise Comments about what you have learned from doing the exercisesAfter completing this exerc ise, I had already know How to create an ArrayList.In my opinion this lab field of study is quite tough because I postulate to Search and list 30 real name Hotel in Malaysia.In this Task User must in addition need to input 30 time of hotel information its became a problem because when I enter the input more than 10 time.my coloured Jay will have a problem .either It cozy It self or Nothing appear at the JOptionPane show input dialog box. Cause of this problem I need to rewrite the hotel information to many time.

No comments:

Post a Comment