Design of C++ Periodic table project

  • Thread starter Thread starter nishantxl
  • Start date Start date
N

nishantxl

Hi there,
I am looking to design a project using C++

The main objective of the project is to display details of periodic
table elements such as periodic element name, properties(such as atomic
number and atomic mass) for each periodic number entered by user. I am
thinking to input all the data regarding each periodic element number
in form of class.

Please give your opinion on the correct design method for the same.

Thanks

Nishant

(e-mail address removed)
 
The main objective of the project is to display details of periodic
table elements such as periodic element name, properties(such as atomic
number and atomic mass) for each periodic number entered by user. I am
thinking to input all the data regarding each periodic element number
in form of class.

Please give your opinion on the correct design method for the same.

creating a class that represents one element is good design.
that class can not only hold the properties, but also be used to draw itself
on your table (if you want one on the screen). after all, the elements
themselves know best where they should be drawn in that table

if you have a collection of elements you can then simply draw them like
this:
//assuming you are using C++/CLI. otherwise you have to do it slightly
different
//also assuming that the element class has a Draw method
foreach(Element e in ElementCollection)
{
e->Draw(....);
}

to store your table you can use a simple database that holds all properties
of an element.
you can load the database during startup so that you can easily adapt your
the data you display for each element.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
Back
Top