Jump to content

Hello everyone I need help creating a flowchart with this


G+_Vincent Panico
 Share

Recommended Posts

Hello everyone I need help creating a flowchart with this...

 

 

Class Car

// Fields declarations

Private Integer yearmodel

Private String make

private Integer speed

 

// Constructor

Public Module Car (Integer year model, string make, Integer speed)

Set yearmodel =year

Set make = makers

Set Speed = 0

End Model

 

// Mutators

Public Module setyearmodel (Integer year)

Set yearmodel = year

End Module

Public Module setmake (string makers)

Set make = makers

End Module

Public Module setSpeed (Integer 0)

Set Speed = 0

End Module

 

//Accessors Methods

Public Function Integer getyearmodel ()

Return yearmodel

End Function

Public Function String getmake ()

Return make

End Function

Public Function Integer getSpeed ()

Return speed

End Function

 

//Accelerate Methods

Public Function getSpeed

Set Speed = Speed + 5

Return Speed

End Function

 

 

Public Function getBrake

Set Speed = Speed - 5

Return Speed

End Function

 

End Class

 

 

int main ()

 

cout<<“Car.accelerate()”

cout<<“Car.accelerate()”

count<<“Car.accelerate()”

cout <<“Car.accelerate()”

cout<<“Car.accelerate()”

Cout End

 

cout<<“Car.brake()”

cout<<“Car.brake()”

cout<<“Car.brake()”

cout<<“Car.brake()”

cout<<“Car.brake()”

Cout End

Link to comment
Share on other sites

 Share

×
×
  • Create New...