Skeleton (computer programming): Difference between revisions

Content deleted Content added
Monky2020 (talk | contribs)
No edit summary
Monky2020 (talk | contribs)
m added another example of pseudocode
Line 44:
Skeleton code is most commonly found in [[Parallel computing|parallel programming]], but is also applied in other situations, like [[documentation]] in [[Programming language|programming languages]]. This helps to simplify the core functionality of a potentially confusing method. It can also be used to allow for a small function within a larger program to operate without full functionality temporarily.
This method of programming is easier than writing a complete function, as these skeleton functions do not have to include main functionalities and can instead be hardcoded to use during development. They usually involve syntactically correct code to introduce the method, as well as comments to indicate the operation of the program. This is not always necessary to call a piece of text skeleton code.
 
 
 
== Relation to Pseudocode ==
[[File:PXL 20201120 092248538.jpg|thumb|A generic example of pseudocode]]
[[Pseudocode]] is most commonly found when [[Plan|developing]] the structure of a new piece of [[software]]. It is a plain English portrayal of a particular function within a larger system, or can even be a representation of a whole program. Pseudocode is similar to skeleton programming, however deviates in the fact that pseudocode is primarily an informal method of programming.<ref name=":0">{{Cite journal|last=Bellamy|first=Rachel K. E.|date=1994-06-01|title=What Does Pseudo-Code Do? A Psychological Analysis of the use of Pseudo-Code by Experienced Programmers|url=https://www.tandfonline.com/doi/abs/10.1207/s15327051hci0902_3|journal=Human–Computer Interaction|volume=9|issue=2|pages=225–246|doi=10.1207/s15327051hci0902_3|issn=0737-0024}}</ref> Dummy code is also very similar to this, where code is used simply as a placeholder, or to signify the intended existence of a method in a class or interface.
 
Line 75 ⟶ 78:
 
Very similar to class implementation, skeleton code can be used to define the methods that are part of an [[Interface (computing)|interface]]. An interface is essentially a [[blueprint]] of a class, which allows for strict object oriented languages (such as [[Java (programming language)|Java]]) to use classes from different [[Java package|packages]] without the need to fully understand the internal functions. Interfaces simply define the methods that have to be present within the class, allowing anyone else to use the methods or implement the class for their personal needs.
public skeletonExample();
 
An [[abstract class]] is almost the same as a class implementation, however depending on the language, at least one method is defined as abstract. This implies that any children of this class (any classes that extend or implement) need to have a method defined for this. Abstract classes have a very similar definition style to interfaces, however a keyword ‘abstract’ is typically used to identify the fact that it needs to be implemented in child classes.
public abstract skeletonExample();
These examples use the Java syntax.
 
== Parallel programming ==