Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Assignment does not make sense to me.  RSS feed

 
Reno Madrigal
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone shed some light on exactly what I should be doing, or point me to the direction to a program that is similar to this one,so that i may refer to it for help.

Here it is:


Instructions: For each pet, your program will allow the vet tech to identify the services performed. Your program should ask the tech to enter the service from a list of services, then, it will prompt for the quantity and create a services receipt itemizing each service rendered along with the appropriate totals for each service, and the total due. Remember to double-space after periods. In this program, the vet tech will be given an option to change the current service selection. If no changes, then a services receipt is produced, but if there are changes then make sure the changes replace the service(s) being changed while leaving unchanged services as they are.

Input Screen 1: This screen will prompt the vet tech to select a particular service.

Carls MOBILE PET CLINIC


Select the service:

1. Feline Group I (FVRCP, FeLV, Rabies)$ 46.50
2. Feline Group III (FeLV, Rabies) 32.50
3. Dog Group I (DHLPP, Corona, Bordetella, Rabies) 47.50
4. Dog Group II (DHLPP, Bordetella, Rabies) 33.50
5. Dog Group III 47.00
(DHLPP, Corona, Bordetella, Roundword Deworm)
6. Dog Spay 57.50
7. Dog Neuter 47.50
8. Cat Spay 40.00
9. Cat Neuter 20.00
10. Cat Declaw 80.00

Input Screen 2: This input screen will ask the vet tech to enter the quantity.

Quantity for:

Name of service @ price of service with $ sign

Example:

Quantity for:

Dog Group I (DHLPP, Corona, Bordetella, Rabies) @ $47.50

Input Screen 3: This input screen will show the service selected and ask the vet tech for any changes. If yes, then back to input screens 1, 2, then 3 again; if not, proceed to input screen 4.

Example:

Do you need to make changes? Enter "Y" for Yes or "N" for No.

Pet Service:

Dog Group I
(DHLPP, Corona, Bordetella, Rabies)
1 @ $47.50 each47.50

Input Screen 4: This input screen will ask the vet tech if he/she wants to make another selection. If yes, then back to input screens 1, 2, 3, and 4 again.

Another service? Enter "Y" for Yes or "N" for No:

Once done, proceed to payment which will issue a services receipt reflecting all the services rendered along with how many, cost for each service, calculated cost for that service, and the total due for all services. Pay attention to the alignment of the output on the receipt. If not using HMTL, you'll have to embed the necessary spaces to align your output. Note: Concatenation of the output string will help you print out multiple selections on the same services receipt. Refer to displayResults() on page 363 of your textbook for help.

Output Screen:

SERVICES RECEIPT

carls MOBILE PET CLINIC

October 8, 2007

Dog Group I
(DHLPP, Corona, Bordetella, Rabies)
1 @ $47.00 each 47.50
Cat Spay
2 @ $40.00 each 80.00

TOTAL DUE: $ 127.50
[ October 22, 2007: Message edited by: Reno Madrigal ]
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell us what parts you are comfortable with and where you are stuck? It's hard to know if we should talk about core Java or Swing or something else.
 
Reno Madrigal
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What i am stuck at is what variables i need to use, i so far have



but i know there are a slew of them, also i dont know if i need a totalCount after the 10th count or what, in my last assignment we were dealing with candidates and there were only 4 from each party and after the 4th i had a totalCount variable.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Reno M", please see your private messages for an important note from me.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to get a little fancy on you and suggest we think about a number of little classes. Let's use shopping terms even though this isn't a shopping site.

The first screen needs to show a list of available services. That makes me think of a Catalog object that holds the list of available things. Each service has a name and a price, which makes me think of a tiny object with two fields.

Start with Service. Can you write Service to make this work?

Then move on to Catalog and make this work:

Show us what you make and where you get stuck. Then we'll know just how to help. Keep it fun!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!