Tuesday, October 22, 2019
How to Use Comments in Java Code
How to Use Comments in Java Code Java comments are notes in a Java code file that are ignored by the compiler and runtime engine. They are used to annotate the code in order to clarify its design and purpose. You can add an unlimited number of comments to a Java file, but there are some best practices to follow when using comments. Generally, code comments are implementation comments that explain the source code, such as descriptions of classes, interfaces, methods, and fields. These are usually a couple of lines written above or beside Java code to clarify what it does. Another type of Java comment is a Javadoc comment. Javadoc comments differ slightly in syntax from implementation comments and are used by the program javadoc.exe to generate Java HTML documentation. Why Use Java Comments? Its good practice to get into the habit of putting Java comments into your source code to enhance its readability and clarity for yourself and other programmers. It isnt always instantly clear what a sectionà of Java code is performing. A few explanatory lines can drastically reduce the amount of time it takes to understand the code. Do They Affect How the Program Runs? Implementation comments in Java code are only there for humans to read. Java compilers dont care about them and when compiling the program, they just skip over them. The size and efficiency of your compiled program will not be affected by the number of comments in your source code. Implementation Comments Implementation comments come in two different formats: Line Comments: For a one line comment, type // and follow the two forward slashes with your comment. For example: // this is a single line comment int guessNumber (int) (Math.random() * 10); When the compiler comes across the two forward slashes, it knows that everything to the right of them is to be considered as a comment. This is useful when debugging a piece of code. Just add a comment from a line of code you are debugging, and the compiler wont see it: // this is a single line comment // int guessNumber (int) (Math.random() * 10); You can also use the two forward slashes to make an end of line comment: // this is a single line comment int guessNumber (int) (Math.random() * 10); // An end of line comment Block Comments: To start a block comment, type /*. Everything between the forward slash and asterisk, even if its on a different line, is treated as aà comment until the characters */ end the comment. For example: /* this is a block comment */ /* so is this */ Javadoc Comments Use special Javadoc comments to document your Java API. Javadoc is a tool included with the JDK that generates HTML documentation from comments in source code. A Javadoc comment inà .javaà source files is enclosed in start and end syntax like so:à /**à andà */. Each comment within these is prefaced with aà *.à Place these comments directly above the method, class, constructor or any other Java element that you want to document. For example: // myClass.java/** * Make this a summary sentence describing your class.* Heres another line. */public class ââ¬â¹myClass{...} Javadoc incorporates various tags that control how the documentation is generated. For example, theà paramà tag defines parameters to a method: /** main method * param args String[] */ââ¬â¹ public static void main(String[] args) ââ¬â¹{ ââ¬â¹ System.out.println(Hello World!);ââ¬â¹ } Many other tags are available in Javadoc, and it also supports HTML tags to help control the output. See your Java documentation for more detail. Tips for Using Comments Dont over comment. Every line of your program does not need to be explained. If your program flows logically and nothing unexpected occurs, dont feel the need to add a comment.Indent your comments. If the line of code you are commenting is indented, make sure your comment matches the indentation.Keep comments relevant. Some programmers are excellent at modifying code, but for some reason forget to update the comments. If a comment no longer applies, then either modify or remove it.Dont nest block comments. The following will result in a compiler error: /* this is /* This block comment finishes the first comment */ a block comment */
Monday, October 21, 2019
The Existence of Black Holes essays
The Existence of Black Holes essays While there are some physicists who believe that black holes do not exist, there is much data to support otherwise. In fact, much evidence seems to support the existence of black holes. For example, NASA's Hubble Telescope and the Chandra X-ray Observatory seem to have discovered "direct evidence' (NASA 2001) of one characteristic of a black hole. This characteristic is the area that surrounds black holes, which emits very little energy. Michael Garcia states, "By detecting very little energy from these black hole candidates, we have new proof that event horizons exist" (NASA). Furthermore, astronomers have also detected sound waves coming from what they believe to be a black home in the Perseus galaxy cluster. (Discovery 2003) Astronomers have long known that gravity in black holes pulls matter toward them, with matter accelerating the closer it comes to the black hole. Calculations also show that gas surrounding black holes will become hotter. One of the most persuasive cases supporting these theories is Cygnus X-1. (Pasachoff 1991 p. 496) By studying mass, velocity, and X-rays around the star HDE 226868, astronomers believe black holes do exist. Another case supporting the existence of black holes is the discovery of "mid-mass black holes" (Beasley 2001) in Meanwhile, John Cramer explains that this theory grounds itself in the fact that with standard general relativity, "gravity is considered to be geometrical', to be a consequence of the curvature of space produced by nearby mass-energy" (Cramer). In short, because "Because gravitational energy does not produce curvature, it does not respect local energy conservation" (Cramer). Those who support this theory also maintain that another problem with the general relativity theory concerning black holes deals with "space-time singularities'" (Cramer). Because we cannot place ourselves inside a black hole, we do not...
Sunday, October 20, 2019
Philippine Business Environment Essays - Maritime Southeast Asia
Philippine Business Environment Essays - Maritime Southeast Asia Philippine Business Environment " The countries that will achieve steady and economic growth in the 21st century are those that go with the tide ". An economic manager must look into his resources and not on what other countries have. The Philippines is rich with natural resources , raw material and especially manpower. That's why when we made a move to improve our economic condition , The Sick Man of Asia was renamed as the New Tiger Cub of Asia. A name signaling other countries that a new threat for world leadership has arrive. We have attracted lots of foreign investors to invest in the Philippines and many more of them are coming . So what's next ? We should not be satisfied of what we are seeing. We should concentrate in the welfare of our people. Since there's an influx of foreign investors here, it is the proper time to show what the Filipinos are made of .Proper promotion of micro-enterprises , and especially promoting rapid development of human capabilities. As an economic strategy this may sound small but actually this is in preparation of something big for us. Technology today has change the world's vision of business. Because of technology we know can communicate better and faster. Everybody is just a phone call away or should we say an E-mail away. Everybody can do business anywhere at anytime . Thus born a new commerce, the E-commerce, or simply the Electronic-commerce and with its birth came Globalization. It is the global expansion of trade and investment , even though there are still lots of arguments whether to join or not this trend, we should be ready. We should look at all the possibilities of this trend. We should be prepared for it otherwise we will be left behind . Singapore is now leading this market of E-commerce in Asia, but because this country is not a democratic country investors are having a hard time doing their job, that's why they are looking for another place . And that's where we go in, we have the people, a good strategic position in Asia, and lastly we follow the rules of democracy . We might not have the best but we have the better men for the job. Filipinos literacy is very high compare to other countries in Asia and we are very adaptable . By creating T-Zones or Technology Zones where all about technology will be seen and used , local and foreign investors will surely come and put up their business here for good . And remember more investors means more profit, the economy will surely skyrocket and the employment rate will soar up. Thus, given our people a fair chance of living a comfortable life. We will be the Center of Technology Services in Asia and this will surely lever our status in the world from a tiger cub to ! The New Tiger of Asia , and maybe just maybe The Dragon of Asia.
Saturday, October 19, 2019
MREmpanada Research Paper Example | Topics and Well Written Essays - 1500 words
MREmpanada - Research Paper Example I. Fragmentation and/or Concentration As a player in the United States restaurant industry, Mr. Empanada is a fast casual industry and not a fast food company as most people take it. The U.S restaurant industry is characterized by countless actors. The industry has already entered the mature stage of the industry life cycle, as growth of the industry slows own. The united states restaurant industry is fragmented into various subsets, the most popular being the fast food, full service restaurants and the fast casual segments. In a fast food setting, food is prepared before being ordered while in a casual setting, food is prepared after the customer has ordered it. There are hundreds of fast food and fast casual joints in United States that offer products that are intractably similar in almost all aspects. Panera Bread Company is the renowned leader in the casual food subset while McDonaldââ¬â¢s is the overall industry leader operating in the fast food segment. The yearly anticipate d growth for the restaurant industry is 1.9% from 2013 through 2018 (The University of Tampa, 2). The slow growth rate is attributable to reduction in consumer disposable income due to prolonged recession period in United States. Consumers opt to consume home cooked means or consumer lower priced items when eating out. This is hurting the growth in the various fragments of the restaurant industry. United States restaurant industry sales ($ billions) (Source: The University of Tampa, 1) II. Switching costs Switching costs are the negative costs that buyers incur due to changing products, brands or suppliers. Switching costs are mostly evaluated in terms of money value, but they may also be time-based, effort based and psychological switching costs. Switching costs may be associated to learning, finding alternatives, ambiguity costs, contractual costs and transaction costs. Switching costs is a control mechanism that exists in most markets (Sundelin, para 1). In the case of Mr. Empana da, there are little or no switching costs as substitutes are readily available. Providers of casual foods are such as the chipotle Mexican grill, Panera bread, Skyline Chili, Donatos Pizza, Freebirds among others, which are easy to locate. Customers who wish to change from Mr. Empanada products and consumer rival products do not incur significant costs. For illustration, learning and compatibility cost is almost zero since the Mr. Empanada and its rivalââ¬â¢s products are undifferentiated. Therefore, customers do not have to look and learn new information with regard to rival products. As such, consumers easily change from one Mr. Empanada products to its rivals due to insignificant switching costs or no cost at all. III. Buyer inclination to substitute In the United States restaurant industry, competition is so rife and fierce. As stated earlier, most of the industryââ¬â¢s products are undifferentiated. Customers hardly notice the difference between competitorsââ¬â¢ produ cts and this extremely heightens buyersââ¬â¢ inclination to substitute (Porter, 28). In regard to Mr. Empanada, buyer inclination to substitutes is indispensably high. The reason is that Mr. Empanada is not known to many people outside its headquarters in Tampa, Florida. In addition to limited popularity, Mr. Empanada offers few types of salads, beverages, sandwiches that
Friday, October 18, 2019
New Business Development Essay Example | Topics and Well Written Essays - 4000 words
New Business Development - Essay Example ervice 28 7.3.Personal and personnel position 29 7.4.Financial Controls 29 7.5.Marketing Controls 30 Marketing control is a vital step for any organization. The Sale objective of the firm is estimated in this process and depending on that the Sales Forecast and Quotas are set for next year budget depending on that. Proper evaluation of the marketing plans is very crucial to set the budget. For this evaluation time to time marketing activities are done like data collection and doing market research on the existing plans how they are implemented and how much effective they are in the market. Depending on the survey results the budget for the next year is calculated. The Venetian Macao should do market research for their plans and find the quality of their services provided to the customer and keep track of every possible problem that can create a problem in the business (Kotler, 2008). 30 Reference 31 A. Assignment I 1. (Company / Business / Service) Description 1.1. The Concept Leisur e industry has become one of the attractive industries in the global market. This industry includes the sectors like tourism, hospitality, entertainment and recreation, and with the changing lifestyle of people, the popularity of leisure services are growing significantly. This paper will attempt to present a new business development of ââ¬ËVenetian Macaoââ¬â¢ in the UK leisure industry. Venetian Macao is popular hotel based in Las Vegas, and it offers a range of services like accommodation, entertainment, casino dinning etc. leisure and casino industry has been playing an instrumental role in UKââ¬â¢s economic development as it attracts a large number of visitors in UK for leisure purposes (PWC-UK, 2011). 1.2. Developmental Perspective 1.2.1. Strategic Perspective Venetian Macao is a premium hotel group that offers leisure services, and hence it primarily focused on very niche market of segment. In the UK leisure industry, the hotel groups will attempt to follow the same s trategy. The following model shows it provisional generic strategy, Figure 1: Generic Strategy (Source: Eldring, 2009, p.7) Therefore, Venetian will focus on focused differentiation strategy by offering high premium leisure and entertainment services to UK people and inbound tourists in UK. By following this core generic strategy, Venetian can be able to develop a competitive advantage. However, in this process it needs to prepare an overall business development strategy. 1.2.2. Marketing Perspective In order to gain competitive advantage in the UK leisure industry, Venetian will focus on the value creation of its customers as well for the UK economies. Venetian is famous for its
EIA Case 1, EIA SLP 1, EIA Case 2, EIA Case 3, EIA SLP 3, EIA Case 4, Essay
EIA Case 1, EIA SLP 1, EIA Case 2, EIA Case 3, EIA SLP 3, EIA Case 4, EIA SLP 4 - Essay Example Generally, more industrialized and economically developed societies have lower fertility than agricultural, less developed societies. Also, within countries, generally, more educated groups with higher incomes have lower fertility than less educated groups with lower incomes. Historically, as groups within countries have improved their living standards, and nations have become more economically developed, health conditions have improved, morbidity and mortality have declined, and fertility has declined due to the adoption of fertility-constraining behaviors, such as the limitation of sexual relations or marriage, practice of contraception, and resort to induced abortion." The biggest gap between those women who are in need of infertility treatment and those who actually receive it exists because, in addition to the aforementioned issues, some women just never take the steps to seek it. This can occur for a variety of reasons. According to Ramsey (2000, pg. 1), "A lot of times, when to seek the fertility treatments depends upon a woman's age and upon her doctor. But, if a woman will seriously take control of the situation - by first seeing a doctor, preferably an obstetrician (a doctor who specializes in the care of pregnant women), before she even starts trying to conceive, to make sure she is in optimum health - is an excellent starting point. This, of course, does not guarantee success right away. This simply acts as the springboard for the road to conception." Three causes of female infertility are functional causes, anatomic causes, and psychosocial problems. Functional problems can occur within a woman's highly complex hormonal system and cause infertility. Anatomic problems can occur within a woman's ovaries, uterus, tubes, cervix, or thyroid gland and cause infertility. The presence, either present or past, of sexually transmitted diseases in a woman's anatomy can cause infertility. Psychosocial problems can cause infertility because of stress, but more often than not, they actually occur as a result of infertility (World Health Organization, 2008). There are a number of factors that can cause or contribute to male infertility, which as previously mentioned, makes up 30-40% of all cases of infertility. These include disorders attributed to his varicocele, disorders of his semen, abnormal or immature sperm being produced, systemic disease, sexually transmitted or other genital diseases, testicular disorders, genetic disorders, immunologic disorders, endocrine disorders, the presence of drugs or chemicals in his system, erectile dysfunction, libido problems, ejaculatory problems, age, injury, and occupation (World Health Organization, 2008). EIA SLP 1: Policy and Advocacy This SLP will focus on infertility in the state of Texas. This state was chosen primarily because of its size and the belief that many options would be available to a wide range of women in the state. Therefore, choosing Texas might provide a wider standpoint from which to determine exactly what options are out there on the state level for women seeking infertility treatment. Of course, this is not known to be true as of this point, but will be determined at a later
Thursday, October 17, 2019
The Notion of Type and its Importance in the 20th Century Essay
The Notion of Type and its Importance in the 20th Century - Essay Example Deutscher Werkbund was established in 1907 by Hermann Muthesius and Friendrich Naumann in order to consolidate art and industry . The debates surrounding Werkbund focused on Muthesius' concept of ââ¬Å"Typisierungâ⬠. According to Muthesius, mass production denoted standardization; however, he combined the economic concept of standardization with Platonic ideal types. Muthesius' ideas were heavily criticized by a number of artists and architects. The debate between him and Van de Velde was not about mechanization, but on the role of the artist. Whereas Muthesius asserted that the artist was separated and abstracted from the production process, Van de Velde advocated the artistic freedom and creativity . Muthesius and Werkbund did not care much about the Fordist aspects of the mass production, rather they tried to bring organization to the otherwise chaotic world of the mass production ruled by fashion, individualism and arbitrariness. Peter Behrens' designs for AEG, which were c alled Types, epitomized the various tendencies within the Werkbund. Behrens's workplace in Berlin has become an atelier for many young architects including Walter Gropius, Mies van der Rohe, Le Corbusier, who would shape the Modern Movement. They learned architecture directly from Behrens. As Curtis noted Le Corbusier practicality and idealism was enhanced through his work for Peter Behrens, who saw mechanization as a vital force in creation of the modern culture.5 Figure 1, Peter Behrens, Types, AEG, 1912. The Werkbund's approach was influential until the end of World War I. However, later on, both Gropius and Le Corbusier abandoned the theoretical approaches of the Werkbund. Before 1914, debates were focused on the design of commodities. After 1920, the architectural issues have increasingly become the focus. Adolf Loos holds a special place in the history of modern architecture, not just as a pioneering figure of the Modern movement, but also as a critic of the Werkebund. In his influential article ââ¬Å"Ornament and Crimeâ⬠(1908) he argued that elimination of ornaments from the useful objects was beneficial to culture ââ¬Å"reducing the time spent on manual labour and releasing energy for the life of the mindâ⬠6. This article can be regarded as an attack to the Werkebund in a sense that it was unacceptable for Loos to give the artist a form-giving role7. He did not believe that the artist is the creator of everyday useful objects8.According to him, style was the outcome of several economic and cultural conditions. Hence he also criticized Muthesius on the ground that he substituted form for ornament9. As Kenneth Frampton indicated , for Loos ââ¬Å"all culture depended on a certain continuity with the past; above all, on a consensus as to a
Subscribe to:
Posts (Atom)