Java program that displays do java

Assignment Help Basic Computer Science
Reference no: EM13934527

Write a Java program that displays DO JAVA as following pattern:
Hint: You may need to use the System.out.println() function. Use one vertical space between two letters in a word and two vertical spaces between two words (i.e., DO and JAVA).

Task 2

Problem Description:

Write a Java program to solve the problem presented below. You may assume that the user will always enter valid data; you do not have to perform data validation.

The entry charges to a zoo are: Children 5 years old and younger: free Accompanied children from 6 to 15 years old: $2 each Unaccompanied children from 6 to 15 years old: $5 each Adults from 16 to 59 years old: $10 each Seniors from 60 years and older: $8 each An accompanied child is defined as one in a family group accompanied by an adult or a senior. An adult or senior can only count as accompanying one child from 6 to 15 years old. No limit is placed on the number of children 5 years old and younger, which is perhaps a failing on the part of the zoo authorities, but simplifies your problem. Ages are integers. Your program will calculate and display the entry charge for each family group and also display the total takings for a sequence of groups. In this process it will correctly determine the number of accompanied children and those not counted as accompanied in each family group. It will request the user to enter the number of children (6 - 15 years old), the number of adults (16 - 59 years old) and the number of seniors (60+ years old) for each group, and it will display the entry charge for each group. The following shows a sample run. Enter a group? (Yes=1/No=0): 1 Enter the number of children (age 6-15): 5 Enter the number of adults (age 16-59): 2 Enter the number of seniors (age 60+): 1 Total entry charge is $44 Enter a group? (Yes=1/No=0): 1 Enter the number of children (age 6-15): 1 Enter the number of adults (age 16-59): 2 Enter the number of seniors (age 60+): 0 Total entry charge is $22 Enter a group? (Yes=1/No=0): 0

Rationale
This assignment has been designed to allow students to test and demonstrate their ability to:

  • be able to implement basic algorithms in Java (objective 1)
  •  be able to apply basic testing and debugging techniques in program development (objective 6)

Material to submit for Task 1
1. You need to submit the java and class files 2. You need to submit a doc/pdf file with a snapshot of the program output
Material to submit for task 2
1. You need to submit the java and class files 2. You also need to submit a doc/pdf file with following information:
a. Analysis: Describe the problem including input and output in your own words (not more than 150 words) b. Testing & Output: Describe how you tested this program (not more than 150 words) with snapshots of the program output

Reference no: EM13934527

Questions Cloud

Locate a hospice that services the elderly in your county : Human service providers work with a variety of clients with a variety of needs. Often, a group of agencies or specialized services may be required for a given client. Your client's mother was recently diagnosed with terminal cancer. Locate a hospic..
Program to create an exit button. : Create a Clear button to clear the result text box and reset both NumericUpdown controls.
Characterize proteins as pure substances isolated : Biochemists generally like to study and characterize proteins as pure substances isolated from their native enviroment. What is the single most important method or procedure that must be availible prior to starting the purification of a protein?
Analyse the decision-making process of a common : How do you decide to buy a new house or a new piece of electronics or to go on a vacation? Though often invisible, there is a strategy in this everyday decision-making. You might ask for recommendations from friends, read reviews online or rely on..
Java program that displays do java : Write a Java program that displays DO JAVA as following pattern: Hint: You may need to use the System.out.println() function. Use one vertical space between two letters in a word and two vertical spaces between two words (i.e., DO and JAVA).
Complete amino acid analysis : Reaction of the original polypeptide with CNBr produced two tetrapeptides. Reaction of one of these tetrapeptides with Edmans reagent followed by hydrolysisyieled a PTH derivative with a (CH2)4-NH3
Identify a phenomenon or aspect of nursing practice : Identify a phenomenon or aspect of nursing practice that is suitable to research; this might be from your previous PEP or in an area of practice that you are interested in pursuing. Using the template available on MyLO,
Long-term certificate of deposit : You need $28,974 at the end of 10 years, and your only investment outlet is an 8 percent long-term certificate of deposit (compounded annually). With the certificate of deposit, you make an initial investment at the beginning of the first year. What ..
Describe the setting and overall storyline of the movie : After watching the movie section, create a report on your analysis. In your report:(five elements), Mention the name of the movie. Describe the setting and overall storyline of the movie. Describe the main characters in the observed movie section

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd