object oriented programming for java or c++

April 1, 2015 at 10:56:55
Specs: Windows 8.1
Design an application that declares an array of five CheckingAccount objects. Prompt the user for data for each object, and then display all the values. Write the pseudocode that defines the class from the class diagram & previous information provided by creating the pseudocode from scratch.

here's what I have so far but I don't think it's right.

Pseudocode:

(Your pseudocode goes here)
Class CheckingAccount
Declarations
Private num accountNum
Private string name
Private num balance

Public void setAccountNum (num nuber)
AccountNum = number
Public void setName (string name)
Name = name
Public void setBalance (num bal)
Balance = bal
Public void displayValues
Return values
EndClass


Class Diagram

CheckingAccount
-accountNum: num
-name: string
-balance: num
+setAccountNum(number : num) : void
+setName(name : string) : void
+setBalance(bal : num) : void
+displayValues() : void


See More: object oriented programming for java or c++

Report •


#1
April 1, 2015 at 11:00:35
I'm not looking for someone to "do this for me" I need to know what I'm doing wrong that way I know for future assignments.

Report •

#2
April 1, 2015 at 11:30:34
You don't seem to be doing anything wrong so far. What makes you think you are?

Report •

#3
April 1, 2015 at 22:53:32
It says I have to declare an array with 5 checking account values and I'm not sure If I have done that in that code can you tell me if this is any better??
Start
Class CheckingAccount
Declarations
Private num accountNum
Private string name
Private num balance
Num SIZE = 5
CheckingAccount accounts[size]
Num sub
Sub = 0
while sub < SIZE
Accounts[sub] = getAccountValues()
Sub = sub + 1
endwhile
DisplayAccounts(accounts, SIZE)
Stop

Public static CheckingAccount getAccountValues()
Declarations
Public void setAccountNum (num nuber)
AccountNum = number
Public void setName (string name)
Name = name
Public void setBalance (num bal)
Balance = bal
Public void displayValues
Output “Enter name”
Input name
Output “Enter account number”
Input accountNum
Output “Enter balance”
Input balance
account.setName(name)
account.setAccountNum(num)
account.setBalance(bal)
Return account
End class

message edited by averagejoe123


Report •

Related Solutions

#4
April 1, 2015 at 23:03:53
No, you haven't declared any arrays yet. You have only outlined the classes that you need, but you haven't yet created any objects.

Report •

#5
April 1, 2015 at 23:13:24
is that updated one any better?

Report •

#6
April 2, 2015 at 09:07:53
There's a danger that this is turning into a step-by-step tutorial session. I'm afraid that I can't take the place of your teacher. If you have questions about a particular point that you don't understand, by all means post them; but wholesale review of code (or pseudo-code) is not really the point of these forums.

Talk to your tutor if you don't understand your project.


Report •

#7
April 3, 2015 at 10:21:41
I was just looking for a yes you're on track or no you need to re write it I don't need any step by step instructions really. But it's ok I submitted my assignment last night and got 100% on it already this is what I submitted,
start
Declarations
num x = 0
num MAX = 5
CheckingAccount accounts[MAX]

while x < MAX
accounts[x] = getAccountData()
x = x + 1
endwhile

x = 0
while x < MAX
accounts[x].displayValues()
x = x + 1
endwhile
stop

CheckingAccount getAccountData()
Declarations
CheckingAccount account
string name
num accountNum
num balance

output “Enter your name ”
input name
output “Enter account number ”
input number
output “Enter balance ”
input balance

account.setName(name)
account.setAccountNum(number)
account.setBalance(balance)
return account

void display(CheckingAccount account)
output “Checking Account data”
account.displayValues()
return

Thanks for your comments though, ya know It occurs to me that every programmer started somewhere in their career and to be a condescending ass just because you think you know more than the person asking for help just shows how little of a person you are. I was never asking for the "answer" or a "step by step" just a simple yes or no to my questions. maybe next time if someone asks for help you wont be such a self righteous ass.


Report •


Ask Question