Friday, January 31, 2020

Software Development Essay Example for Free

Software Development Essay The program template represents a complete working Java program, with one or more key lines of code replaced with comments. Read the problem description and examine the sample output; then study the template code. Using the problem-solving tips as a guide, replace the /* */ comments with Java code. Compile and execute the program. Compare your output with the sample output provided. Then answer the follow-up questions. The source code for the template is available at the course website (sclass). Problem Description Write an application that plays â€Å"guess the number† as follows: Your application chooses the number to be guessed by selecting an integer at random in the range 1–1000. The application then displays the following in a label: I have a number between 1 and 1000. Can you guess my number? Please enter your first guess. A JTextField should be used to input the guess. As each guess is input, the background color should change to either red or blue. Red indicates that the user is getting â€Å"warmer,† and blue indicates that the user is getting â€Å"colder.† A JLabel should display either Too High or Too Low to help the user zero in on the correct answer. When the user gets the correct answer, Correct! should be displayed, and the JTextField used for input should be changed to be uneditable. A JButton should be provided to allow the user to play the game again. When the JButton is clicked, a new random number should be generated and the input JTextField changed to be editable. Sample Output Problem-Solving Tips 1. Use methods from the JTextField class to manipulate all JTextField components. For instance, method setText will set the text of the text field, and method setEditable will set whether the text field can be edited or not. 2. Method setBackground from class JFrame sets the background color of the JFrame. 3. Use method nextInt from class Random to generate a random number from 1 to 1000. You will need to scale the range of values produced by random by 1000 and shift the range by 1. 4. Use variables lastDistance and currentDistance to determine the distance of the guess from the actual number. If this distance gets larger between guesses, set the background color of the JFrame to blue. If this distance gets smaller or stays the same, set the background color to red. 5. If you have any questions as you proceed, ask your lab instructor for assistance. Follow-Up Questions and Activities 1. Modify the previous program to keep track of how many guesses the user has made, and display that number in another JLabel in the JFrame. 2. Now modify the previous program so that there is another JLabel in the JFrame that contains the number to be guessed, but does not become visible, until the user guesses the right number. In other words the JLabel is always there, the user just can’t see it until the correct number is guessed. Submission Submit 3 files of the 3 version of GuessGameFrame: GuessGameFrame1, GuessGameFrame, and GuessGameFrame3.java via the slcass.

Thursday, January 23, 2020

My Sociological Perspective Essay -- Sociology essays

  Ã‚  Ã‚  Ã‚  Ã‚  Sociology is a part of everyday life. People experience sociological changes when they get married, get a new job, or get discriminated against. All of these things can alter a person’s perspective on a group of people or even the world. Since the beginning of this class, I have personally endured several sociological changes in my life. I recently started a new job. I’m meeting new and wonderful people and I no longer dread having to go to work. I have also begun setting plans for my wedding to the one girl who I know will make everyday better than the one before. But, perhaps the one instance that has affected me the most and the deepest was when my parents got a divorce. This is something that occurred over ten years ago but it still plagues me to this day. One moment I thought that we had a perfect family unit. Everyone was happy and everyone got along great. Then, the next thing I knew, my parents were in court everyday trying to get custody of my older sister and myself. This left me hurt and confused. The worst part was after the divorce was over. My father got custody of us- which I preferred because it meant I didn’t have to move away and I didn’t have to live with my mother’s new boyfriend (her boyfriend while she was married). My mother got visitation rights two days of the week and every Sunday. So, instead of seeing my mother everyday when she would come home from work and having her tuck me in at night, I now saw her only three times a week. This was the...

Wednesday, January 15, 2020

Pet Wonderland Services (PWS) Essay

Introduction to the organization Pet Wonderland Services (PWS) is a new business in pets industry. PWS first shop was at Shah Alam section 13. Although there are several pets shop in Shah Alam, PWS wil brings new services to the animal lovers communities as. Vision To serve the best quality, friendly and effective service and fulfill customer satisfaction. Mission To be one of the top pet shop that brings the most high quality and effective services in the Malaysia. â€Å"Your pets is our responsible too† Objective The main objective of this service is to ease community that they would not have to bring their pet to our shop but we will go to their house and give the services that they wanted to. In our services, we only provide the best pets product and we will consult with the owner about their pets first so that we can use an appropriate an suitable pet’s product to their pets. We want to deliver a quality services so that customer will believe in us. We are not just gaining profit, we are also gaining trust to our customer and love to the animal.

Tuesday, January 7, 2020

Poverty and Pollution - Free Essay Example

Sample details Pages: 2 Words: 559 Downloads: 4 Date added: 2019/04/15 Category Ecology Essay Level High school Tags: Pollution Essay Did you like this example? Poverty and Pollution The assertion Pollution is the price of progress is supported some scholars that outlines different reasons as evidence. Evidently, some scholars identify the poor as the individuals that pay the price of the pollution for their progress. In the first stance, developing countries where poverty is rampant incur low costs and thus dumping polluting industries in these nations helps in the reducing the high costs of dealing with effects of pollution in developed countries. Don’t waste time! Our writers will create an original "Poverty and Pollution" essay for you Create order Instead of having a region recording high increase in pollution, the polluting agents should be redirected to clean because the concept helps in managing the high costs of pollution. The last statement that supports the assertion is the fact that people value their environment and consider keeping it clean relative to the rise in their incomes. Evidently, the fall in costs is noticeable when pollution rates fall due to the shift of the dirty from affluent to the affluent nations. A close examination of the ideas used to support the assertion that the poor should pay the price of their progress through increased pollution reveals that the economically, the ideology works and helps in economic improvement. However, it is apparent that the assertion offers economic benefits while the tradeoff ignores the moral issues evident in the decision to redirect pollution to the poor countries and regions. According to the human rights, all human beings have the right to life and this means the right to a healthy environment. Apparently, redirecting pollution to the poor is a wrong against humanity and it is punishable by law. Economic progress and development are noted as two close concepts are mutually, interdependent. Considering the economic value of a nations goods and services increases, the activities and the commitment of the nations workforce to produce quality and large quantities determine the positive economic progress. When relating economic progress which is on an upward trend, it is then true to assert that economic development rises, Therefore, the two concepts of the economy are mutually dependent. Using this relationship, it is evident that for developing countries to experience economic development, people in polluted regions cannot be relocated because most of the activities they engage in result in the pollution. For instance, the residents of Valley of Death in Brazil depend on their daily activities to earn and cater to their needs. However, the same activities that they value because of the employment opportunities available. One significant aspect of life is that one cannot relocate the individuals because they will lose their jobs and source of income. Therefore, instead of using the region as entirely for industrial services, it is significant to leave the individuals to sustain their living standards through the job opportunities that they polluting individuals offer. Therefore, pollution becomes a minor aspect while the jobs remain as the significant factors as they help in sustaining the living of the poor individuals in the polluted region. Using this example, the residents of the Valley of Death portray that the economic progress of the region influences economic development because the workforce has helped in the development of Brazils overall economy. In this way, economic growth overlooks some aspects that are dangerous to the community such as pollution. A polluted environment is a good place for the current residents because they manage to get money for improving their living standards.