JAVA Coding Question. This is the L03C"Implementing the Displayable Interface", The L03B can be referred to the second a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

JAVA Coding Question. This is the L03C"Implementing the Displayable Interface", The L03B can be referred to the second a

Post by answerhappygod »

JAVA Coding Question. This is the L03C"Implementing theDisplayable Interface", The L03B can be referred to the secondanswerof www.answers.com/homework-help/questions-a ... d757bd3b95
Assignment Objectives
Deliverables
A zipped Java project according to the How to submit Labsand Assignments.
O.O. Requirements (these items will be part of your grade)
Contents
Implement a Displayable interface. This new interface will helpthe graphics implementation in the next assignment.
Java Coding Question This Is The L03c Implementing The Displayable Interface The L03b Can Be Referred To The Second A 1
Java Coding Question This Is The L03c Implementing The Displayable Interface The L03b Can Be Referred To The Second A 1 (48.41 KiB) Viewed 43 times
FootballPlayerData
FootballPlayerData will now implement a second interface, calledDisplayable.
Java Coding Question This Is The L03c Implementing The Displayable Interface The L03b Can Be Referred To The Second A 2
Java Coding Question This Is The L03c Implementing The Displayable Interface The L03b Can Be Referred To The Second A 2 (11.51 KiB) Viewed 43 times
The NetBeans Project
This new assignment brings in a new interface, Displayable.
Java Coding Question This Is The L03c Implementing The Displayable Interface The L03b Can Be Referred To The Second A 3
Java Coding Question This Is The L03c Implementing The Displayable Interface The L03b Can Be Referred To The Second A 3 (139.42 KiB) Viewed 43 times
You should keep building from your previousTableMember/TableData Netbeans project.
Below is the required initial codein app andin Controller.
The code above will test you implementation of theinterface Displayable.
If your implementation is correct it will generate the displaybelow:
Functionality
There is a new interface in this project, Displayable
FAQ - Frequently Asked Questions
What are the initial (default) values for the 4 newvariables?
firstLineToDisplay
lastLineToDisplay
linesBeingDisplayed
lineToHighlight
What happens when invalid values (too small-negative ortoo large-outside the table size) are set tofirstLineToDisplay?
firstLineToDisplay
app Creates model, view and controller objects Model private FootballPlayerData fpData; • No parameter constructor • Methods public FootballPlayerData getFpData() public void setFpData(FootballPlayerData fpd) Controller Model model View view All parameter constructor View • No parameter constructor Methods void basicDisplay(String s) * void basicDisplay(ArrayList<String> arr) TableData . • String name • Height height int weight • Person String hometown • String highSchool . Two constructors • Encapsulation • No parameter All parameter • String toString() • Private attributes • Get and set methods implements FootballPlayerData extends Football Player int number String position • Two constructors • No parameter All parameter • Encapsulation ▪ Private attributes • Get and set methods • String toString() public void load Table(); public ArrayList<TableMember> getTable(); public ArrayList<String> getHeaders(); public ArrayList<String>getLine(int line); public ArrayList<ArrayList<String>> getLines(int firstLine, int lastLine); ArrayList<TableMember> players; void ReadPlayersFromXML() {...} public void load Table() {...} public ArrayList<Table Member> getTable() {...) public ArrayList<String> getHeaders() {...} public ArrayList<String> getLine(int line) {...} public ArrayList<ArrayList<String>> getLines(int firstLine, int lastLine) {...} TableMember public String getAttribute(int n) public ArrayList<String>getAttributes() public String getAttributeName(int n) public ArrayList<String>getAttributeNames() implements • int feet Height Int inches • Two constructors ▾ No parameter • All parameter • Encapsulation . Private attributes • Get and set methods. String toString() • Modified to display . 9'99" Displayable public in getFirstline ToDisplay!); public int getLineToHighlight public in getlastline ToDisplay); public int gatinasBeing Displayed: public void setFinLineToDisplay(int firstline) public void setline ToHighlightfin: highlighted line); public void setLastLineToDisplayim last nel pubilc veld setUnesBeingDisplayed Int numberOfLines); implements
public class Football PlayerData implements TableData, Displayable {
Projects Files A04C_Solution_FootballPlayer Source Packages Services <default package> app.java Controller Controller.java Model Displayable.java FootballPlayer.java Football PlayerData.java Height.java Model.java Person.java TableData.java TableMember.java View View.java <d D Controller has a required code. There is a new interface, called Displayable. It has methods that will help a TableData class to display its data graphically.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply