TheFlorida Dental Associationneeds a simple program to record whatteeththe members of Florida families have. Different Floridians have different numbers of differenttypes of teeth(the program must use...


TheFlorida Dental Associationneeds a simple program to record whatteeththe members of Florida families have. Different Floridians have different numbers of differenttypes of teeth(the program must use this simplified categorization of types of teeth):



  • Incisors (the 'I' teeth)

  • Bicuspids (the 'B' teeth)

  • Missing teeth (the 'M' teeth)


The program must record the teeth for one
Florida family
. When it starts the program asks how many people there are in the family (maximally 6), then for each family member gets their
name
, a string of tooth types for the uppers (maximally 8 teeth including missing teeth), and a string a tooth types for the lowers (maximally 8 teeth including missing teeth), e.g., the string "BMIIBBM" would represent 7 teeth (of which two are missing). The names are recorded in an array of strings. The tooth information is recorded in a
three dimensional
array of characters, where each plane corresponds to a person, there are two rows for uppers and lowers, and each row has a column for each tooth. Once the information is recorded the program must offer a
menu
of four options:

  1. Print the family's teeth record.

  2. Extract a tooth (with a check that there is something there to remove).

  3. Report the family's root canal indices, which are the roots of the quadratic equation Ix2+Bx-M, where I, B, and M are the family's numbers of those types of teeth.

  4. Exit (with asmile)


The program must be reasonably idiot proof:

  • Menu options must be accepted in upper and lower case.

  • Tooth letters must be accepted in upper and lower case.

  • All input must be checked to be in range, and if not the user must be asked to input again.

  • You may assume that numeric input will be syntactically correct.


Here's what a sample run should look like (with the keyboard input shown in italics) ...


Welcome to the Floridian Tooth Records
--------------------------------------
Please enter number of people in the family :
-3

Invalid number of people, try again :
7

Invalid number of people, try again :
3

Please enter the name for family member 1 :
Henrietta

Please enter the uppers for Henrietta :
ABCDEFGH

Invalid teeth types, try again :
IIIBMBIIIMBBMIII

Too many teeth, try again :
BMBIMBM

Please enter the lowers for Henrietta :
BBMIIMBB

Please enter the name for family member 2 :
Stanley

Please enter the uppers for Stanley :
miim

Please enter the lowers for Stanley :
bbMMbb

Please enter the name for family member 3 :
Raul

Please enter the uppers for Raul :
BBIbbbB

Please enter the lowers for Raul :
bbiIIBB



(P)rint, (E)xtract, (R)oot, e(X)it :
T

Invalid menu option, try again :
p



Henrietta

Uppers: 1:B 2:M 3:B 4:I 5:M 7:B 7:M

Lowers: 1:B 2:B 3:M 4:I 5:I 6:M 7:B 8:B
Stanley

Uppers: 1:M 2:I 3:I 4:M

Lowers: 1:B 2:B 3:M 4:M 5:B 6:B
Raul

Uppers: 1:B 2:B 3:I 4:B 5:B 6:B 7:B

Lowers: 1:B 2:B 3:I 4:I 5:I 6:B 7:B


(P)rint, (E)xtract, (R)oot, e(X)it :
E

Which family member :
Melanie

Invalid family member, try again :
stanley

Which tooth layer (U)pper or (L)ower :
M

Invalid layer, try again :
u

Which tooth number :
27

Invalid tooth number, try again :
4

Missing tooth, try again :
2



(P)rint, (E)xtract, (R)oot, e(X)it :
P



Henrietta

Uppers: 1:B 2:M 3:B 4:I 5:M 7:B 7:M

Lowers: 1:B 2:B 3:M 4:I 5:I 6:M 7:B 8:B
Stanley

Uppers: 1:M 2:M 3:I 4:M

Lowers: 1:B 2:B 3:M 4:M 5:B 6:B
Raul

Uppers: 1:B 2:B 3:I 4:B 5:B 6:B 7:B

Lowers: 1:B 2:B 3:I 4:I 5:I 6:B 7:B


(P)rint, (E)xtract, (R)oot, e(X)it :
R

One root canal at 0.41
Another root canal at -3.04


(P)rint, (E)xtract, (R)oot, e(X)it :
X



Exiting the Floridian Tooth Records :-)


You must ...



  • Do a top down design for this problem, producing a structure chart (it's OK to draw it by hand and take a photo).

  • Do a design for the program.

  • Implement the program in Java


The project is due by 8am on 24th October. Your must submit in Blackboard:

  • Structure chart

  • Design

  • Source code


You must sit with the TA when (s)he runs your program in the lab session so you can see together how well it works.

Your project is worth 15% of the course grade. It will be assessed on ...



  • Structure chart and Design - 4%

  • Performance to specification - 8%

  • Programming style - 3%



Oct 20, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here