d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Help With Ada > Never Touched It Before
Add Reply New Topic New Poll
Member
Posts: 9,805
Joined: Jul 8 2008
Gold: 9.00
Feb 28 2013 11:53am
We just finished a huge Java project and the next task is to port it to Ada but in the meantime our professor has given us this

Quote
Specifically, the assignment is write a program which models a student specifically, you need to
create a student class where a student has the following properties:
creation function
name
major
gpa
number of hours
create a test program which creates a student and displays all the properties of the student.


I never knew ada existed until a few weeks ago, can anyone give me a nudge in the right direction? :D
Member
Posts: 15,988
Joined: Nov 12 2005
Gold: 4,399.00
Feb 28 2013 01:40pm
I just checked ADA on Wiki. It reminds me of Pascal syntax.
Guess Wiki Books is the place where you have to begin with. (the only one good tutorial I found)
http://en.wikibooks.org/wiki/Ada_Programming
Member
Posts: 9,805
Joined: Jul 8 2008
Gold: 9.00
Feb 28 2013 09:44pm
Got the program working but one of my variables is a Float and if i declare it to be 2.75 ada displays it as 2.75000E+00 which is ugly :|
Member
Posts: 28,331
Joined: Jun 9 2007
Gold: 11,700.00
Mar 1 2013 06:55am
Quote (Wacko @ 1 Mar 2013 03:44)
Got the program working but one of my variables is a Float and if i declare it to be 2.75 ada displays it as 2.75000E+00 which is ugly :|


if you can't do it otherwise split the number into three parts: whole number part, ".", tenth, hundredth
(have done that myself to create tidy outputs with other programming languages though - you need "tenth" and "hundredth" to accommodate cases where the "tenth" is zero)
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll