Friday, May 31, 2019

Essay --

1.Task Write the title or the code of exercises that collect to be completed (e.g. Lab Exercise 1)Lab Work 12.Objectives List the targetives of doing the exercise2.1. To learn how to use the array list 2.2. Create a generic class of Array list of 30 hotels 2.3.To complete Hotel ADT class 2.4 To display the name of all hotels and their location2.5 Calculate and display the snatch of manner for each Hotel that stimulant drug by user3.Algorithm and designWrite the steps to solve the problem and/or the design of the solutionHotel-sName take in-sDistrict String-iNumRoom int+Hotel()+Hotel(String,String,int)+getData(String,String,int) void+getName() String+getDistrict() String+getNumRoom() int+getCalculateTax() double+isLarge() boolean+display() StringDemo Hotel Flow Chart START Declaration 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 attached types6.Total 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 completing the exercise Comments about what you have learned from doing the exercisesAfter completing this exercise, I had already know How to create an ArrayList.In my opinion this lab work is preferably tough because I need to Search and list 30 real name Hotel in Malaysia.In this Task User must Also need to input 30 time of hotel information its became a problem because when I enter the input more than 10 time.my blue Jay will have a problem .either It close It self or Nothing appear at the JOptionPane show input dialog box. instance of this problem I need to rewrite the hotel information to many time.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.