Create a class hierarchy
How do i create a Java class hierarchy for my program. What are common classes that programs use that would be included in the hierarchy? Help would really be appreciated.
^^ that pretty much sums up how to do it
but inheritance is basically the guts of java, super duper important concept to understand. So i suggest sitting down with a good java book for a couple hours, and completely grasp the ideas of inheretance, polymorphism, encapsulation .. all that good stuff.
personally i like The Complete Reference books. i studied with them and they really do help alot
Similar Messages
-
Nested Subpanels for LVOOP Class Hierarchy
Hi,
I am trying to figure out a way to create a configuration window for a class object using a subpanel. The problem is that I have LVOOP class hierarchy of 3 levels, and thus I want to use nested subpanels, one subpanel for each inheritance.
For example,
A.lvclass (abstract class)
Private Data Members
String A
Configuration Window VI ( Within a FP there is a String A control and a subpanel for its child class)
B.lvclass (abstract class) (child of A.lvclass)
Private Data Members
Boolean A
Boolean B
Configuration Window VI (Within the FP there is a Boolean A control and a Boolean B control, plus a subpanel for its child class)
C1.lvclass (concrete class) (child of B.lvclass)
Private Data Members
File Path A
Configuration Window VI (Within the FP there is a File Path A control)
C2.lvclass (concrete class) (child of B.lvclass)
Private Data Members
Boolean C
Configuration Window VI (Within the FP there is a Boolean C control)
What I am trying to accomplish is to create configuration windows for C1 and C2. For each configration window, there are sections for class A and class B, and for the class itself. However, I do not want to recreate the same section (for A and B) over and over again each time new children (siblings of C1) are introduced. To avoid this duplicate task, I think using nested supanes makes sense. But I don't know the best way to do it. Any advice is appreciated
Thank you
TailOfGon
Certified LabVIEW Architect 2013See these two threads and be sure to read them thoroughly and follow the links:
http://forums.ni.com/t5/LabVIEW/An-experiment-in-creating-compositable-user-interfaces-for/m-p/12623...
http://forums.ni.com/t5/LabVIEW/A-more-successful-experiment-in-creating-compositable-user/m-p/12768...
Try to take over the world! -
Helper Class Hierarchy for WDA
Hi
I am working on a project that requires several WDA apps and therefore wish to house all common methods in one class. Each WDA has it's own assistance class and methods particular to that WDA but I wish to access common methods from a 'superclass' of these assistance classes.
My question is how to call the common methods.
Since my assistance class already has a superclass - cl_wd_assistance - I am currently creating an instance of my common methods class in the constructor of the assistance class. I am thinking I should be using an interface somehow but am unclear on the reason behind it.
Has anyone setup a hierarchy of classes to support a multi WDA project?
Cheers
IanHaven't had this need myself but did you try to make the superclass (which has the common functionality) inherit from CL_WD_COMPONENT_ASSISTANCE, and then defining each subclass in the corresponding WDA? I don't know if WDA does some validation which forces any class defined as Assistance class to inherit directly from CL_WD_COMPONENT_ASSISTANCE (I'm not at the system now), but such a validation would make no sense...
What I mean is to:
1 - Create the superclass e.g. ZCL_SUPER from SE24 (if you didn't yet) and manually define CL_WD_COMPONENT_ASSISTANCE as its superclass.
2 - Create each subclass e.g. ZCL_SUBxx from SE24 (if you didn't yet) and manually define ZCL_SUPER as their superclass (instead of CL_WD_COMPONENT_ASSISTANCE).
3 - Manually define each ZCL_SUBxx class as the assistance class of each component (instead of creating the class while defining as SE80 allows).
So this would leave you with this hierarchy:
CL_WD_COMPONENT_ASSISTANCE
ZCL_SUPER
ZCL_SUB01
ZCL_SUB02
ZCL_SUBxx
Since all the ZCL_SUBxx classes would be still inheriting (indirectly) from CL_WD_COMPONENT_ASSISTANCE, they should be allowed to be defined as Assistance classes...let me know if this works.
Regards
Edited by: Alejandro Bindi on Jan 28, 2009 11:39 PM
I may add however, you should use inheritance when you can define (conceptually) that any subclass is a special type of the superclass...exceptions are less common. -
How to create a Case Hierarchy
Hi Friends,
Can you pls guide me on how to create a Case Hierarchy?
It's very much urgent.
Thanks in advance and warm regards
PurnenduHello,
Please have follow below steps for case hierarchy,we have implemented for service scenario
General paths:
CRM/Case Management/
CRM/Interaction Center Web Client/Business Transactions/Case Management
Transaction:
SCASE_CUSTOMIZING
Basic Settings
Number range defined
Case type emergency defined
Status Settings
Case status profile defined with values as below
Case attribute settings
Case priority defined (general for all case types)
Case reason defined
Case Category defined
Create function profile and assign to Case Type
ICWebclient settings
Define and Enhance ICWeb client profile for Case processing
Case Search added to Z_XXXX Nav Bar and new Z_XXXX_Case defined. New Nav Bar has Case Management Entry added.
Additional ICWeb client profile defined. Assign new Nav Bar assigned and Case function profile to the new profile.
Assign function profile for ICWebclient
Create new runtime profile and assign to new ICWeb client profile. Also replace appropriate controllers for Case Management. Pls refer to Technical Specification for details.
Case Record Model (transaction scase)
RMS ID
Case Record Model Cycle0 activity. View for linking business objects to Case record.
Set Up Registry
Include new record model and service provider for record model in Case Type
Maintain filters in ICWeb
Column headings
BOL paths, mapper classes and search help for CSRs.
Define Filter profile
Maintain entries to Filter profile.
Assign Filter profile to Case Type
New Business activities for Case
Transaction type Case activity , partner determination and status profile created.
Status profiles for new business activities
Partner Determination procedures for new business activites
Regrds
Shanmuga -
Hi all
I've a class hierarchy problem. I'm trying, to create classes that will parse XML files for different sports, and display them in the table. I've no influence on XML files which I read, and they are different for each sport. To avoid code repeating I've created such a structure:
public interface Sport {
public List getMatchlist(Integer leagueId);
public void addMatchlist(Integer localCategoryId);
public void addMatch(Integer categoryId, Map data);
public abstract class TeamSport implements Sport {
public List getMatchlist(Integer remoteLeagueId, int NOT_STARTED_STATUS) throws Exception {
// here between other lines I need to invoke function from class that extends this class...
public class Soccer extends TeamSport{
private static String SPORT_ID = "s";
public Soccer(Map params) {
super(params, SPORT_ID);
public String getRemoteStatusName(int statusCode) {
return SoccerStatusCodes.getStatusName(statusCode);
public int getRemoteNotStartedStatus() {
return SoccerStatusCodes.NOT_STARTED;
} What my problem is, that for team sports xml are very similar, but xml node attribute status has different values for each sport. And I need to use it in TeamSport.getMatchlist class. I'd need to invoke Soccer.getRemoteNotStartedStatus() function to get correct value for given value. Obviously it's not possible, because TeamSport is superclass of Soccer. The simplest solution is to copy getMatchlist method from TeamSport to Soccer class and every other sport, but it's resulting in duplicating the code, what I want to avoid.
Can anybody help?
Michalhmmm. interesting model. feasible, indeed. I cansee
maintenance increasing exponentially, though: alot
of "if sportName.equals("football")" and so onand
so forth, more code to be added to controllers for
each new sport. still, the notion of a "teamsport"
as a concrete entity does seem attractiveWhat does 'maintenance' have to do with the
conditional test of the value of sportName variable?a lot. as new sports are added, that test can have new results. unless these sport classes exist purely for their own sake, something else is using them. and that something else needs to be maintained
What makes you think that the if statement would be
required anywhere? And, what makes you think that
there will be controllers for each sport? see above for the "if" statement. controllers was just an example of a class that would use these "sport" classes, something has to use them, and the OP hasn't specified what, so a little guesswork was involved
The problem the OP stated was there was no access to
the method in TeamSport. Whether he/she was correct
or not is another story. it's a public method. how would it not be accessible? you don't think that, as an analyst, it's your job to identify incorrect assumptions?
Regardless, the better design is to make TeamSport
concrete and not code a separate class for each
sport, in my opinion.I'm undecided. I think your concrete TeamSport idea is interesting, but I'm unsure. having a general-purpose sport, that is configurable, could be open to having nonsensical configurations made, such as soccer on ice
Aside, software maintenance and software design are
two different concepts.are they? I strongly disagree. what is a "good" design? IMO, a good design must, by necessity, facilitate the adding of new features, the extending of the application. that is maintenance is it not? -
Need a link for ADF class hierarchy diagrams
Hi,
For some reasons i m not able to find via google or in documentation I need class hierarchy diagrams of the following
- ADF Binding e.g Faces* to AttributeBinding etc etc.
- ADF Model e.g ApplicationModule > Entity > View to Rowset etc etc
these diagrams frequently used by Frank Nimphius in his presentations.
Best Regards,
Zeeshan BaigHi,
I created the binding diagram using Oracle JDeveloper class diagrammer. You don't need the source code for this. Create a new class diagram in JDeveloper, use right mouse context menu and choose "Add to diagram". Browse the class path to the classes you want to see (e.g. adf | model | binding) and select them. It takes a few seconds for the diagrammer to layout the classes, but then you have the diagram you are looking for.
Frank -
Over the past few months I've been making the transition from
Flash AS2 to Flex and am comfortable with combining AS3 and mxml,
but the vast majority of my code is stored in functions within a
<mx:Script> tag. Now comes the bigger question: When does it
make sense to put my code in new classes instead of embedding my
code in functions?Also, wherever possible, take some time to consider what you
will create before you write any formal code. When you start to see
code that will be used in various places in your code, or else code
that might be useful in future Flex applications and components,
put it in a class hierarchy and you will reap immediate and future
benefits. -
Class Hierarchy - general question...
SAP Gurus.
...just a general question regarding class hierarchy.
Are there any negative effects that I should be aware of...before I start creating a lot of class hierarchies ?
Can they easily be deleted ?
Please advice.Hi,
as per my knowledge, once its being used in configuration its not easy and some times not allowed to delet it.
Thanks
Ritesh -
Hi,
We have created Material Classes / chararacters and have ALEd to the respective systems.
We have defined Hierachies using CL22N.
But when we ALE Classes using BD92, the Hierachy data or the links between classes does not get sent.
Therefore in the receiving system we do not find the inherited charatcers.
Can any if of you convey me if there is any transaction to ALE the Class Hierarchy?
Thanks,
Midhun.Hello,
This function enables you to set up your class hierarchy as a class network by assigning a class to several superior classes.
Procedure:
To maintain one or more superior classes for a class within a hierarchy, proceed as follows:
1.Choose in the Classification menu Assignment , Assign class to superior classes.
2.Enter the name and class type of the class you want to include in the hierarchy. Use the pushbutton Last processed classes to choose on of the last ten classes you have worked. These can also be classes that were processed with different applications.
If the class you enter is part of a class hierarchy, you can choose Environment Class hierarchy to see the other classes in the hierarchy in tree form.
Confirm your entries.
3.Enter one or more superior classes.
When you assign classes to a class, you can restrict the allowed values of the characteristics. This means that only values from the restricted allowed values are allowed when you classify objects in these classes.
4.If you want to assign values to characteristics and at the same time set restrictions for the values you must first position the cursor on a class. Double-click on the class or select Values.
You see a list of the characteristics of all the classes to which an object is assigned. This list is based on the user settings you made in Extras User settings, tab page Value assignment.
5.Save your assignment.
Hope the information is useful
Regards -
Hi,
We have created Material Classes / chararacters and have ALEd to the respective systems.
We have defined Hierachies using CL22N.
But when we ALE Classes using BD92, the Hierachy data or the links between classes does not get sent.
Therefore in the receiving system we do not find the inherited charatcers.
Can any if of you convey me if there is any transaction to ALE the Class Hierarchy?
Thanks,
Midhun.I do not work with Class Hierarchyies, but Check your Message Type in your ALE Model. There are several Mesage Types that can be selected when seeting up your Class Message.
-
How to create proxy class for a Siebel WS which has many Workflows in it?
Hi,
I am facing a strange problem. I have a Web Service for which there are many workflows associated with this. When I generate WSDL for this Web Service and later on generate proxy class in .NET, it creates mutilple classes for each workflow. From UI, I can invoke a perticular method for the class for which I am interested in. But when I am building the same in JDeveloper, using Web Service proxy, I get only one class and I am not interested in invoking method in this class but interested in some other class for which the proxy was not generated. Is there some way to generate multiple classes in JDeveloper proxy?
Thanks,
Sudha.I have figured this out. Actually Generate proxy creates package and it includes all the class in it. Now i am able to invoke web service method call.
-
How to create a class using java script..
Hi all,
Iam new to java script and I tried out the following program but its not working..I basically created a class just like a java prog' but Iam not getting any output or error.Iam attaching the code below.
If I created one function inside the script and create one object its working fine but what should I do when I have a lot of function??so I created a class and put all the function and created an object but its not working..
Do let me know what changes should I do..Iam attaching the code which I had written. or give me an example of how to create a class with couple of functions using JAVASCRIPT
Thanks
Avis_su
<html>
<head><title>JSP Page</title></head>
<body>
<SCRIPT language = "JavaScript">
<!--
//Created classes
class book
var title: String;
var author:String;
function author()
doucument.write("Author is " +this.author);
function tile()
doucument.write("Title is " +this.title);
function printall()
var counter = 0;
function author();
function title();
var chapters = Array[String];
for(chapter in this chapters)
counter++;
document.write("Chapter" counter" :"+this.chapters[chapter]+"<br>");
var thisbook = new book()
thisbook.author = "Sivagami";
thisbook.title = "MS in CS giude";
thisbook.chapters = new Array[10];
thisbook[0] = "Prepare to Excell in all ";
thisbook[1] = "Learn to be happy";
thisbook[2] = "Learn to be healthy mentally emotionally physically";
thisbook[3] = "Siva and Subbu along with kidssssss will be successful in future";
thisbook.printall();
//-->
</script>
</body>
</html>Run this program to get your answer:
public class AnswerToYourPost {
public static void main(String args[]) {
System.out.println("TRUE/FALSE: This question
ion belongs on a Java forum.\n"
+ "ANSWER: " + ("Javascript" == "Java"));
}Since when do we compare objects for equality using operator == ? -
How to create Development Class in SAP R/3 4.7c and Netweaver?
I follow some old notes on ABAP Development Class but I could not create a new Development Class. i.e. Stuck in creatinf a type group. Please give some details on how to create a development class. Thanks.
see the following stepa:
(A) Procedure for creating a type group:
/nse80
1. Object Navigator> select Development class>(Enter your development class
yFTGxxDEV
2. Double click on development class object types.
3. Type Group: zPTAxx1.
4. Click on the Create button at the bottom (4th one from the left).
5. Enter short text: zPTAxx1 type group.
6. Save>Enter your development class> click on diskette button to save the type group
7. Select Source Code tab and enter the following:
"An example type-pool statement containing types and constants
type-pool zxx1. "zxx1 is a type pool. It is also known as a type group
types: zxx1_dollars(16) type p decimals 2,
zxx1_lira(16) type p decimals 0.
constants:
zxx1_warning_threshold type i value 5000,
zxx1_amalgamation_date like sy-datum value '19970305'.
8. Select Type Group from menubar
a) Check
b) Save
c) Activate
9. Click the back button or F3 to exit.
10, Show your type group to your teacher.
11. Go to ABAP editor and enter the following program:
"Calculations on date
report zxx_0914.
type-pools zxx1. "contains zxx1_amalgamation_date
data: d1 like sy-datum,
d2 like d1,
num_days type p.
d1 = d2 = sy-datum.
subtract 1 from d1.
write / d1. "yesterday's date
d2+06 = '01' " first day of current months
subtract 1 from d2.
write / d2. " last day of previous month
num_days = sy-datum - zxx1_amalgamation_date.
write / num_days. " number of days since amalgamation
11. Double click zxx1 from the type-pool statement to see the type group.
12. Follow lab1 procedure and run your program
(B) Run an ABAP program using field symbol ( i.e. pointer)
report zxx_lab6.
data f1(3) value 'ABC'. "Step 1 Define a variable
field-symbols <f>. "Step 2 Define a pointer variable ( it only stores address)
assign f1 to <f>. "Step3 Initialize the pointer variable with an address
write <f>. "Step4 Now you can use <f> in place of f1
write / f1. " (same as write f1 )
<f> = 'xyz'. " Assign a new value to f1
write <f>.
write / f1.This is not the way to create a new development class.
Follow this steps to create a development class:
http://sap.mis.cmich.edu/abap4/knowbase/Create-Dev-Class.pdf
Regards,
Naimesh Patel -
How to create a custom Hierarchy in IDT 4.0
Hi All.
I am trying to create a custom hierarchy objects in the Information Design tool, But I am not able to find it here as same sort like the universe designer in 3.1 or 4.0 . I have found the navigational path but I am not sure how I can use it as a hierarchical objects in my reports, Can anyone please suggest how to create a custom hierarchical dimension in IDT 4.0.
Thanks,
NavinCustom Hierarchy are called navigation path in IDT. I will suggest to go through the navigation path tutorials below
http://scn.sap.com/docs/DOC-22087
Hierarchical objects are no different than any regular objects but they enable the drilling in drill mode in the report and you can create a cascading prompt on top of them..
If after going through this you still have any specific questions just let us know... -
Create a Navigational Hierarchy for filtering with the Table API
Hello,
I've built a WAD report acourding to the how to document: "Create a Navigational Hierarchy for filtering with the Table API".
It works great but i dont know How to make the hirarchey to show the key and the text.
Please Advice.
DavidHi Kenneth,
please have a look in the source of the executed Web Application. What is inside of the <div> with the id filter?
You should also find a td tag with id hier_xyz with xyz the filter inside of the <div>-Tag with id filter.
Also check whether you have a javascript error.
Have a look on the Javascript function set_style. Perhaps you can paste it here, than I can have a look.
Heike
Maybe you are looking for
-
Hi all, I've encounter a pretty big issue while trying to check if everything with my windows phone 8.1 app is all right. After creating package (*.appx) I launched Windows App Certification Kit 3.4 to run it against all the test. Each time I try I g
-
In CRM relationship appends the Changed partner function in R/3 -Middleware
Hi Experts, Partner functions in R/3 are mapped as relationship categories in CRM and the transfer is happening through middleware. However if I change the BP for an existing partner function in R/3, it is not changing the BP in corresponding relatio
-
Hi friends, I want to change the address of ship to party in delivery document and billing document, table level. So anyone can tell me what is the table and fields name to change the address in delivery document and billing document. In LIKP and VBR
-
Pass tablespace(s) as a parameter to RMAN using batch file (windows2000)
I want to make a backup of one or more than one tablespaces. For Example: Backup tablespace USERS,TOOLS; Backup tablespace USERS; In this regards I am using windows batch file. Below you find the code of batch file which I am using to perform this op
-
How to save a PNG with layers in Photoshop.
i am tryin to save a PNG with layers. Is it poosible ? What i found on the net is ....PNG is not meant for multiple layers. But still want to know if photoshop have its own proprietory standard for PNG. Thanks in advance.