Customer
This class should now implement the Comparable interface. Customer instances should be ordered by their last name, then first name, and finally the name of their associated building.
toString() - Add this method that returns a String with the following format: <lastName>, <firstName>
Reading
This class should now implement the Comparable interface. Reading instances should be ordered by their timestamp.
XmlHandler
The following methods should be updated:
startElement() - The handler logic should be modified such that it can now create and associate Customer, Building, Room, Device, and Reading objects.
endElement() - Modify this method such that the current customer instance is added to the ArrayList of customers when a closing customer element is encountered.
No hand written and fast answer please
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images
- 15arrow_forwardimport bridges.base.ColorGrid;import bridges.base.Color;public class Scene {/* Creates a Scene with a maximum capacity of Marks andwith a background color.maxMarks: the maximum capacity of MarksbackgroundColor: the background color of this Scene*/public Scene(int maxMarks, Color backgroundColor) {}// returns true if the Scene has no room for additional Marksprivate boolean isFull() {return false;}/* Adds a Mark to this Scene. When drawn, the Markwill appear on top of the background and previously added Marksm: the Mark to add*/public void addMark(Mark m) {if (isFull()) throw new IllegalStateException("No room to add more Marks");}/*Helper method: deletes the Mark at an index.If no Marks have been previously deleted, the methoddeletes the ith Mark that was added (0 based).i: the index*/protected void deleteMark(int i) {}/*Deletes all Marks from this Scene thathave a given Colorc: the Color*/public void deleteMarksByColor(Color c) {}/* draws the Marks in this Scene over a background…arrow_forwardPython Required information id fname lname company address city ST zip 103 Art Venere 8 W Cerritos Ave #54 Bridgeport NJ 8014 104 Lenna Paprocki Feltz Printing 639 Main St Anchorage AK 99501arrow_forward
- Using an appropriate package and test class name, write the following tests for GamerProfile's constructor: testNameShouldNotBeNull testNameShouldNotBeEmpty testNameShouldNotBeBlank testShouldCreateValidGamerProfile Hint: use assertTrue or assertFalse for getters involving boolean values Hint: get the game list from the gamer and call the list's isEmpty along with an assertTrue or assertFalse, as appropriate.GamerProfile:public class GamerProfile { private String userName; private boolean pvpEnabled; private boolean online; private ArrayList<GameInfo> gameLibrary; public GamerProfile(String userName) { this.userName = userName; this.pvpEnabled = false; this.online = false; gameLibrary = new ArrayList<GameInfo>(); } // Getter for the getUserName variable public String getUserName() { return userName; } // Getter for the PvpEnabled…arrow_forwardModalProp detailsanimationType it's an enum of ('none', 'slide', 'fade') and it controls modal animation.visible its a bool that controls modal visiblity.onShow it allows passing a function that will be called once the modal has been shown.transparent bool to set transparency.onRequestClose (android) it always defining a method that will be called when user tabs back buttononOrientationChange (IOS) it always defining a method that will be called when orientation changessupportedOrientations (IOS) enum('portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right')Modal component is a simple way to present content above an enclosing view.using given Modal make a Basic Example?arrow_forwardjava please dont take other website'answer. rthis is actually practice question ANIMALCLASS Create an Animal class. Each animal has a name, an x and y integer coordinate. The Animal class should have at minimum the following methodsbelowbut you may want to add more if necessary: Also note, everyanimal will need to have to have “z”passed to it so that it knows how big the map is. •A constructor that starts the animal at 0,0 with a name of "Unknown Animal"and only accepts a single int value (int mapSize). •A parameter constructor that allows the programmerto input all 4pieces of information.(x,y, name, mapSize)oCheck the parameters for valid input based on the constraints. Ifany of the input valuesis invalid, adjust it any way you deem necessary in order to make it valid. •getX()and getY() •getName() •toString(). o This should print out the name and coordinates of the animal. •touching(Animal x) This method should determine if the animal is on the same spot as a secondanimal(x). It…arrow_forward
- can someone help me or teach whats wrong with my code please badly needed this nightarrow_forward// Declare data fields: a String named customerName, // an int named numItems, and // a double named totalCost.// Your code here... // Implement the default contructor.// Set the value of customerName to "no name"// and use zero for the other data fields.// Your code here... // Implement the overloaded constructor that// passes new values to all data fields.// Your code here... // Implement method getTotalCost to return the totalCost.// Your code here... // Implement method buyItem.//// Adds itemCost to the total cost and increments// (adds 1 to) the number of items in the cart.//// Parameter: a double itemCost indicating the cost of the item.public void buyItem(double itemCost){// Your code here... }// Implement method applyCoupon.//// Apply a coupon to the total cost of the cart.// - Normal coupon: the unit discount is subtracted ONCE// from the total cost.// - Bonus coupon: the unit discount is subtracted TWICE// from the total cost.// - HOWEVER, a bonus coupon only applies if the…arrow_forwardJava Given main(), complete the SongNode class to include the printSongInfo() method. Then write the Playlist class' printPlaylist() method to print all songs in the playlist. DO NOT print the dummy head node.arrow_forward
- in this android app package com.example.myapplication;import androidx.appcompat.app.AppCompatActivity;import android.os.Bundle;import android.widget.ListView;public class PlayerActivity2 extends AppCompatActivity {ListView simpleList;String SerialNo[] = {"1", "2", "3", "4", "5", "6","7","8","9","10"};int flags[] = {R.drawable.image1, R.drawable.image2, R.drawable.image3, R.drawable.image4, R.drawable.image5, R.drawable.image6, R.drawable.image7, R.drawable.image8, R.drawable.image9, R.drawable.image10};String Names[] = {"mmm", "nnn", "aaa.", "bbb", "ccc", "ddd","eee jk"," ijk","Virgil jk","gil jklk"};String Score[] = {"1", "2","3", "5", "4", "3","5","5","5","5"};@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity2);simpleList = (ListView)findViewById(R.id.simpleListView);//ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, R.layout.activity_listview, R.id.textView,…arrow_forwardLLNode: public class LLNode<T> { protected T info; protectedLLNode<T>link; public LLNode(Tinfo){ this.info=info; link=null; } publicvoidsetInfo(Tinfo){ this.info=info; } publicTgetInfo(){ return info; } publicvoidsetLink(LLNode<T>link){ this.link=link; } publicLLNode<T>getLink(){ return link; } @Override public String toString(){ return "LLNode [info="+info+", link="+link+"]"; } } MyLLNode: public class MyLLNode { LLNode<String>head; public MyLLNode(){ this.head=null; } public MyLLNode(String first){ this.head=newLLNode<String>(first); } //------------------------------------------------------------- public void addAtEnd(String newstr){ LLNode<String>node=head; LLNode<String>newNode=newLLNode<String>(newstr); if(this.head==null){ this.head=newNode; } else{ while(node.getLink()!=null){ node=node.getLink(); } node.setLink(newNode); } } //------------------------------------------------------------- public void addAtFront(String…arrow_forwardUser.java User is a class that represents a user in the music player application. Every User contains a library which stores all their Playlists. A User can create Playlists or add Playlists made by other users to their library. Additionally, they can also share Playlists with other Users. Each User has the following attributes: username - Represents the username of the user The name of a user should never be null library Represents the library of the User. A list that contains all the playlists the user has created or added. Every user's library will start with a playlist called "Liked" which stores the songs that the user has liked. This playlist should have a creation Date of 0. Save for the Liked playlist, a user's library should be sorted in order of recency. That is, a more recently created playlist should appear earlier than an older one. currentPlaying Represents the song the user is currently listening to. -If it is null, then the user is not listening to any song. User should…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education