Sunday, May 24, 2020

A Main Class in Java Contains the Main Method

All Java programs must have an entry point, which is always the main() method. Whenever the program is called, it automatically executes the main() method first. The main() method can appear in any class that is part of an application, but if the application is a complex containing multiple files, it is common to create a separate class just for main().  The main class can have any name, although typically it will just be called Main. What Does the Main Method Do? The main() method is the key to making a Java program executable. Here is the basic syntax for a main() method: public class MyMainClass { public static void main(String[] args) { // do something here... }} Note that the main() method is defined within curly braces and is declared with three keywords: public, static and void : public: This method is public and therefore available to anyone.static: This method can be run without having to create an instance of the class MyClass.void: This method does not return anything.(String[] args): This method takes a String argument. Note that the argument args can be anything  Ã¢â‚¬â€ its common to use args but we could instead call it stringArray. Now lets add some code to the main() method so that it does something: public class MyMainClass { public static void main(String[] args) { System.out.println(Hello World!); }} This is the traditional Hello World! program, as simple as it gets. This main() method simply prints the words Hello World! In a real program, however, the main() method just starts the action and does not actually perform it. Generally, the main() method parses  any command line arguments, does some setup or checking, and then initializes one or more objects that continue the work of the program.   Separate Class or Not? As the entry point into a program, the main() method has an important place, but programmers do not all agree on what it should contain and to what degree it should be integrated with other functionality. Some argue that the main() method should appear where it intuitively belongs — somewhere at the top of your program.  For example, this design incorporates main() directly into the class that creates a server: However, some programmers point out that putting the main() method into its own class can help make the Java components you are creating reusable. For example, the design below creates a separate class for the main() method, thus allowing the class ServerFoo to be called by other programs or methods: Elements of the Main Method Wherever you place the main() method, it should contain certain elements since it is the entry point to your program. These might include a check for any preconditions for running your program. For example, if your program interacts with a database, the main() method might be the logical place to test basic database connectivity before moving on to other functionality. Or if authentication is required, you would probably put the login information in main(). Ultimately, the design and location of main() are completely subjective. Practice and experience will help you determine where best to put main(), depending on the requirements of your program.

Wednesday, May 13, 2020

Up From Slavery, by Booker T. Washington Essay - 1140 Words

Booker T. Washington was a young black male born into the shackles of Southern slavery. With the Union victory in the Civil War and the Emancipation Proclamation of 1863, Washington’s family and blacks in the United States found hope in a new opportunity, freedom. Washington saw this freedom as an opportunity to pursue a practical education. Through perseverance and good fortunes, Washington was able to attain that education at Hampton National Institute. At Hampton, his experiences and beliefs in industrial education contributed to his successful foundation at the Tuskegee Institute. The institute went on to become the beacon of light for African American education in the South. Booker T. Washington was an influential voice in the†¦show more content†¦After much trial an error, the school discovers an excellent method to brick making. The school was so successful that white people who had no interest in the school came to them because they made good bricks. W ashington states in his work â€Å"The making of these bricks caused many white residents of the neighborhood to begin to feel that the education of the Negro was not making him worthless, but that in educating our students we were adding something to the wealth and comfort of the community.† Washington felt that the students’ quality of bricks changed the white residents’ perception of blacks in the community. This is the key to Washington’s belief system of industrial education. In addition, Washington details how his students have gone on to obtain many jobs as brick makers in the South. He successfully makes his point that industrial education can have a positive impact on black employment and race relations in the South. If students were only exposed to book knowledge, they may have missed out on these opportunities. He also goes on to support his claim that the industrial skills the students have learned will provide them gateways to use their e ducational assets as well. The next example the author provides is from his early childhood as a prospective student of Hampton Institute. Washington tells the experience of being eager to enter Hampton Institute, however at the time he had no money and initiallyShow MoreRelatedAnalysis Of Up From Slavery By Booker T. Washington779 Words   |  4 Pagesresult, Booker T. Washington and W.E.B Dubois work on achieving equality and civil rights. On Up from Slavery, Booker T. Washington argues that â€Å"It is important and right that all privileges of the law be ours, but it is vastly more important that we be prepared for the exercise of these privileges.†1 Washington implies that African Americans need to prove themselves to the white people. He wants them to be understanding of the white people’s point of view and be patient with them. Washington suggestsRead MoreEssay about Booker T. Washington: Up from Slavery2688 Words   |  11 PagesThe autobiography of Booker T. Washing titled Up From Slavery is a rich narrative of the mans life from slavery to one of the founders of the Tuskegee Institute. The book takes us through one of the most dynamic periods in this countrys history, especially African Americans. I am very interested in the period following the Civil War and especially in the transformation of African Americans from slaves to freemen. Up From Slavery provides a great deal of information on this time period and helpedRead MoreBooker T. Washington Up from Slavery Chapter 1 Summary1784 Words   |  8 PagesThis chapter begins where it should begin - at the beginning! Or least at the beginning as Booker knew it. He tells us he was born in Franklin County Virginia, but he is not sure of the year - it’s either 1858 or 1859 - and he doesn’t know what month or what day. He does know that his birth took place near a crossroads post-office called Hale’s Ford. Otherwise, his earliest impressions are of the plantation and the slave quarters, the most miserable, desolate, and discouraging of surroundings. HisRead MoreThe Life And Work Of Booker T. Washington. Antwaneisha1179 Words   |  5 Pages The Life and Work of Booker T. Washington Antwaneisha Maborn Bethel University â€Æ' Literary and English Works of Booker T. Washington Booker T. Washington was born on April 5, 1856, but according to his autobiography, he does not know the actual date of birth. Washington published his autobiography titled Up from Slavery in 1901. This paper will state facts about Washington s books and format of his writing. Up from Slavery was so popular that people all over the nation were influenced andRead MoreBooker T. Washington, W.E.B. Du Bois and John Hope Essay1286 Words   |  6 Pagescomplete mess after the Civil War. The early part of the 20th century brought many changes for African Americans. There was a difficult challenge of helping newly free African American slaves assimilate among their white counterparts. They suffered from crop failures, economic hardships, and the early failures of Reconstruction in the south. So as result many Southern African Americans migrated to northern cities in search of employment and a chance at a better life. However, Southern African AmericansRead MoreBiography of Booker T Washington Essay673 Words   |  3 PagesBiography of Booker T Washington Booker T. Washington, born on April fifth, 1856, was born into slavery on the Burroughs’ tobacco farm. His mother was a cook, and his father was a white man from a nearby farm. Despite the small size of the farm Washington always referred to it as a plantation, and his life was not much different from any other slave on the larger plantations. â€Å"The early years of my life, which were spent in the little cabin, were not very different from those of other slaves†Read MoreBooker T. Washington Essay1249 Words   |  5 Pagesposition that one has reached in life as by the obstacles which he has overcome† –Booker T. Washing. Booker Taliaferro Washington was born in Hale’s Ford, Virginia on April 5th, 1856 to Jane Burroughs and an unknown White man. Washington was married three times. His first wife was Fannie N. Smith from Malden, West Virginia. Booker and Fannie were married in the summer of 1882 and had one child together named Portia M. Washington. Fannie died two years later in May 1884. The second wife was Olivia A. DavidsonRead MoreCompare And Contrast Booker T. Dubois1296 Words   |  6 PagesW.E.B Du Bois and Booker T. Washington were both fighting for the betterment of blacks, but accomplished it differently. W.E.B Du Bois believed in blacks getting a classical education and obtaining equality. While, Booker T. Washington wanted blacks to focus on vocational skills and give up their rights to be a success. W.E.B Du Bois disagreed because he believed that African Americans should not limit themselves to vocational labor but preferred that they educated themselves so they would be recognizedRead MoreThe New Land Of America Essay1619 Words   |  7 PagesAccording to the professor of history at South Carolina State University, Doctor Stanley Harrold, â€Å"The Atlantic slave trade began in Africa in the mid-1400s and lasted into the 19th century. Initially, Portuguese traders purchased small numbers of slaves from kingd oms on the western coast of Africa and transported them for sale in Portugal and Spain. The Atlantic slave trade did not become a huge enterprise until after European nations began colonizing the Americas during the 1500s. During the 1600s theRead MoreEssay on Booker T. Washingtons Immense Achievements 952 Words   |  4 Pages1856, Booker Taliaferro Washington was born into slavery in Hale’s Ford, Virginia on a local plantation. Being born into slavery, it was quite clear that Washington would never amount to much. Knowing this though, did not stop him from dreaming about the many achievements he wanted to accomplish. Washington’s passion to learn is what transformed him into, not a lowly slave, but instead: an educator, a writer and the founder of the Tuskegee Institute. Through these achievements though, Booker T. Washington

Wednesday, May 6, 2020

Week Assgn Free Essays

Mixed Methods Lori Hudson Walden University Mixed methods research is combined with qualitative and quantitative research methods which consist Of the quality and emphasize measurement and variables (Dentin Lincoln, 2003). In this paper, I will provide information about mixed methods and what type of designs, timing, and data collection that was used by Tortes. I will also discuss the theoretical lens that will be used in the study. We will write a custom essay sample on Week Assgn or any similar topic only for you Order Now Will also discuss the data analysis, which will deliver bendable information and the rationale as to why mixed methods were used in this particular article. Design Using the mixed methods research article by Tortes provided in the Learning Resources, briefly describe the type of design and the timing of the data collection. Theoretical Lens Briefly describe the theoretical lens that underlies the study. Be sure to support your points with scholarly support. Data Analysis Briefly describe the data analysis procedures used in the study. Be sure to support your points with scholarly support. Rationale for Mixed Methods Explain the rationale for using the mixed method design in this study. Be sure to support your points with scholarly support. Conclusion Your conclusion section should recap the major points you have made in your work. However, perhaps more importantly, you should interpret what you have written and what the bigger picture is. Remember your paper should be 2 – 3 pages not counting your title page and reference page. Please do not exceed three pages of content. Save your Application as a â€Å". Doc† or â€Å". RTF† file tit the filename APP+your first initial+last name. For example, Sally Ride’s assignment filename would be â€Å"Appeasers†. Use the â€Å"Submit an Assignment† link, choose the Week 9: Application basket, and then add your Application as an attachment. References Always include references. Be sure every reference is in PAP format with a hanging indent. Also, every citation should have a reference and vice versa. Use the PAP manual, the Citation Guide or some source to verify your format. PAP is very specific about punctuation and how elements Of the reference are presented. How to cite Week Assgn, Papers

Monday, May 4, 2020

Bromination of Acetanilide free essay sample

The objective of this experiment was to use melting point and NMR to determine which of two isomers, ortho or para, would most likely form after brominating Acetanilide through electrophilic aromatic substitution. Procedure/Observations: 1. Weigh out ~280 mg of acetanilide in a 10 mL r. b. flask with a stir bar. 2. Then, add 2. 0 mL of glacial acetic acid using a calibrated Pasteur pipet. 3. Stir the mixture until all of the acetanilide has dissolved. It may be necessary to add more acetic acid dropwise until full dissolution has occured. In the fume hood, add 0. 6 mL of 4. 1 M bromine solution in acetic acid. 5. Cap the round bottom flask before returning to the bench. 6. For 15-20 minutes, stir the reaction mixture at room temperature so that the reddish-orange coloration will fade and a solid precipitate will form. 7. Return to the hood and add a few more drops of the bromine solution in the hood if all the coloration fades. We will write a custom essay sample on Bromination of Acetanilide or any similar topic specifically for you Do Not WasteYour Time HIRE WRITER Only 13.90 / page 8. Once the reaction is complete, return to the hood. 9. Transfer the mixture to a 25 mL Erlenmeyer flask with 10 mL of water. 10. Rinse the reaction flask out using another 5. 0 mL of water. 11. Using a Pasteur pipet, add 30% sodium thiosulfate dropwise while swirling until the bromine coloration is no longer visible. 12. Return to the bench to complete the final work-up. 13. Cool the reacting mixture in an ice bath. 14. Collect the solid precipitate using a Hirsch funnel through vacuum filtration. 15. Wash with ice cold water to complete the transfer. If the crude product is yellow, disconnect the vacuum, add a few drops of the sodium thiosulfate solution, then reconnect the vacuum. Follow with 1 or 2 washings of ice cold water. 17. Dry the crude product 5-10 minutes using the vacuum. 18. Recrystallize the crude product using an ethanol/water mixed solvent combination. Be sure to dissolve the crude product in the minimal volume of hot ethanol with swirling. 19. Add water dropwise until a cloud point is reached. 20. Rewarm the solution until it is clear again. 21. Allow the solution to cool until crystals form before icing. 22. On a Hirsch funnel under vacuum using cold water washings collect the crystals. Continue the vacuum for 5-10 minutes to dry. 8. Find the final weight and calculate the yield. 9. Find the melting point of the product, then obtain the 1H NMR of the product in CDCl3. Overall Reaction: Mechanisms: Stoichiometric Table: CompoundMolar Mass (g/mol)Density (g/mL)mg or mLMmolMolar equiv. Acetanilide (Limiting Reagent)135. 171. 22333. 0 mg2. 46 1. 00 Bromine soln. 159. 803. 1190. 6 mL24. 610. 0 Glacial Acetic acid60. 051. 0492 mL34. 914. 2 Calculations 1) Moles of Acetanilide Used = 0. 333g/135. 17g/mol *1000 = 2.46mmol. Moles of Bromine Solution Used = 4. 1M * 0. 0006L = 24. 6mmol 3) Moles of Glacial Acetic Acid Used = 1. 049g/ml * 2. 00ml * 1mol/60. 05g/mol = 34. 9mmol 4) Molar equivalent of Bromine soln. = 24. 6 mmol / 2. 46mmol = 10. 0 5) Molar equivalent of Glacial Acetic Acid = 34. 9mmol / 2. 46mmol = 14. 2 6) Theoretical Yield of Product = 214. 07g/mol * 0. 00246mol = 0. 527g 7) Crude yield of product = 0. 1471g 8) Actual Yield of Product = 0. 0912g 9) Percent recovery from recrystallization = 0. 0912g/0. 1471g * 100 = 61. Percent yield = 0. 0912g/0. 527g * 100 = 17. 3% Results: Theoretical Yield of Product: 0. 527g Actual Yield of product: 0. 0912g Percent yield from recrystallization: 61. 9% Percent Yield of Product: 17. 3% Literature Melting Point Range: 166-170Â °C Experimental Melting Point Range: 165. 5-166. 5Â °C NMR Data: Shift (ppm)SignalIntegrationAssignment 7. 382-7. 434Multiplet 4 (2 for each aromatic proton-overlapping)Aromatic protons ortho and meta to the acetamido group 7. 260SingletProteolated SolventCDCl? impurities 2. 168Singlet3Methyl group