soompi forums: P-r-o-g-r-a-m-m-i-n-g - soompi forums

Jump to content

Page 1 of 1

P-r-o-g-r-a-m-m-i-n-g anyone taking up this subject?

#1 User is offline   miyachan11 

  • ♥ 1990.01.05 ♥
  • Icon
  • Group: Moderators
  • Posts: 4,892
  • Joined: 14-October 07

Posted 20 August 2008 - 06:18 PM

I have a Programming Class last semester, this semester and next semester. It was not easy for me so I hope I can meet people here in Soompi taking up the same subject so we can all keep in touch. lol.

But I really need help in my PROGRAMMING class. I have a difficulty in making programs and stuffs like that. tears.gif

and am I on the right track? or I posted on the wrong place? sweatingbullets.gif
Posted Image( 비스트 / BEAST / B2ST SOOMPI OFFICIAL THREAD )miyachan11 : TWITTER & TUMBLR & YOUTUBE & NEW YOUTUBEavatar : seetwopm @ Livejournal; banner : babyseob @ Twitter
0

#2 User is offline   aimi54 

  • Member
  • Pip
  • Group: Members
  • Posts: 312
  • Joined: 06-December 06

Posted 20 August 2008 - 06:21 PM

I don't have too much experience in programming, but what language are you learning?
0

#3 User is offline   miyachan11 

  • ♥ 1990.01.05 ♥
  • Icon
  • Group: Moderators
  • Posts: 4,892
  • Joined: 14-October 07

Posted 21 August 2008 - 10:48 PM

im using C++

Visual Basic
Posted Image( 비스트 / BEAST / B2ST SOOMPI OFFICIAL THREAD )miyachan11 : TWITTER & TUMBLR & YOUTUBE & NEW YOUTUBEavatar : seetwopm @ Livejournal; banner : babyseob @ Twitter
0

#4 User is offline   ChunJin 

  • Member
  • Pip
  • Group: Members
  • Posts: 1,497
  • Joined: 04-October 05

Posted 21 August 2008 - 11:16 PM

I can help if you need any help. C++ is one of my specialties :3.
0

#5 User is offline   miyachan11 

  • ♥ 1990.01.05 ♥
  • Icon
  • Group: Moderators
  • Posts: 4,892
  • Joined: 14-October 07

Posted 25 August 2008 - 05:14 PM

really? OMG..im having a hard time with programming.
i really need help..
Posted Image( 비스트 / BEAST / B2ST SOOMPI OFFICIAL THREAD )miyachan11 : TWITTER & TUMBLR & YOUTUBE & NEW YOUTUBEavatar : seetwopm @ Livejournal; banner : babyseob @ Twitter
0

#6 User is offline   lovablekrnstar63 

  • OH YEA~ i get to CUSTOMIZE!
  • Pip
  • Group: Members
  • Posts: 3,676
  • Joined: 04-October 05

Posted 25 August 2008 - 05:51 PM

i remember i did C++ my freshman year
i was supposed to learn java my sophomore year but didnt take the class.
sorry, i dont remember much.
forloops? and.. cin cout..thats about it
:)
0

#7 User is offline   miyachan11 

  • ♥ 1990.01.05 ♥
  • Icon
  • Group: Moderators
  • Posts: 4,892
  • Joined: 14-October 07

Posted 25 August 2008 - 06:23 PM

QUOTE
// Checking Account Class and Program

// TM Bank/Insurance/Investment Inc. asked you to write a software for an e-checkbook to be given to customers.
//The checkbook should permit the following:
// 1) create an account by "depositing" money,
// 2) "depositing money" into the account, and
// 3) write sequentially numbered checks on the account.

// The checking account should always have a nonnegative balance since
// TM Bank/Insurance/Investment Inc. is not planning to cover its customers' bad checks
// Date of Submission: August 31, 2008


class CheckingAcct {


// ---- member variables ---- maintain the balance in terms of cents to avoid precision problems.


// ---- constructor function ----

// [1] Create an account with the specified balance and initial check number.


// ---- member functions ----

// [1] Write a check for the given amount. The check's number is returned.
//If the check will bounce, an error message is printed and the returned value is zero.

// [2] Deposit money in the account.


// [3] Query the balance.


// [4] Print the balance.


// ---- destructor function ----

// [1] When the checking account is being destroyed, warn if the
// user will lose all the money in the account.

};


CODE
int main()
{
    checkingAcct Pedro(500,0,1001);
    checkingAcct Juan = checkingAcct(250,34, 51);

    cout << "Pedro has "; Pedro.print(cout); cout << ".\n";
    cout << "Juan has "; Juan.print(cout); cout << ".\n\n";

    cout << "Pedro works hard and deposits his paycheck.\n";
    Pedro.deposit(123, 23);
    cout << "Pedro has "; Pedro.print(cout); cout << ".\n\n";

    cout << "Juan spends a lot of money.\n";
    cout << "Check numbers:\n";
    cout << "\t" << Juan.writeCheck(73,00) << endl;
    cout << "\t" << Juan.writeCheck(135,59) << endl;
    cout << "\t" << Juan.writeCheck(93,12) << endl;
    cout << "Juan has "; Juan.print(cout); cout << ".\n\n";

    cout << "Both Pedro and Juan die of natural causes.\n";
    cout << "Pedro had "; Pedro.print(cout); cout << " unspent.\n";
    cout << "Juan had "; Juan.print(cout); cout << " unspent.\n\n";
    system("pause");
    return 0;
}


anyone help?
Posted Image( 비스트 / BEAST / B2ST SOOMPI OFFICIAL THREAD )miyachan11 : TWITTER & TUMBLR & YOUTUBE & NEW YOUTUBEavatar : seetwopm @ Livejournal; banner : babyseob @ Twitter
0

#8 User is offline   ChunJin 

  • Member
  • Pip
  • Group: Members
  • Posts: 1,497
  • Joined: 04-October 05

Posted 26 August 2008 - 12:26 AM

Does it have to be in that format? There's more easy ways to go about the int main() area, and ways to make it much more flexible. Such as --> cout << "Pedro has "; Pedro.print(cout); cout << ".\n";. You can do this just as cout << "Pedro has " << Pedro.print(cout) << ".\n"; It'd be more easy to have say Pedro.balance(), and have in the class int balance() { return amount; }

However, if not, post up some of the code you've already developed =). Classes are useful as they allow you to call functions using pointers.

I won't do your homework *completely* for you, but, I will steer you in the right direction.
0

#9 User is offline   miyachan11 

  • ♥ 1990.01.05 ♥
  • Icon
  • Group: Moderators
  • Posts: 4,892
  • Joined: 14-October 07

Posted 01 September 2008 - 12:41 AM

QUOTE
delete codes


can you tell me what's wrong with my codes?
and how to make destructors...
thanks ^^
Posted Image( 비스트 / BEAST / B2ST SOOMPI OFFICIAL THREAD )miyachan11 : TWITTER & TUMBLR & YOUTUBE & NEW YOUTUBEavatar : seetwopm @ Livejournal; banner : babyseob @ Twitter
0

#10 User is offline   ChunJin 

  • Member
  • Pip
  • Group: Members
  • Posts: 1,497
  • Joined: 04-October 05

Posted 01 September 2008 - 12:01 PM

-- Taken Code Out --

Modulus ( % ) finds remainders.
~ is a destructor.
0

#11 User is offline   Takuza606 

  • Member
  • Pip
  • Group: Members
  • Posts: 106
  • Joined: 29-July 08

Posted 01 September 2008 - 12:34 PM

I wish my school had a programming class >.<
I'm going to start learning to program because this year for BEST robotics, we need to know how to use C. It'd be allot easier if there was a class....
Don't believe in yourself, believe in me, who believes in you.
I reject your reality and substitue my own

0

#12 User is offline   miyachan11 

  • ♥ 1990.01.05 ♥
  • Icon
  • Group: Moderators
  • Posts: 4,892
  • Joined: 14-October 07

Posted 01 September 2008 - 05:08 PM

AngeloDS thanks a lot for the BIG help ^^
Takuza606 i havent used C.
we are actually using C++.
if you need help with programming, just go here and ill help if i can.
i guess only with the BASICS..lol...
im not very good. ^^
Posted Image( 비스트 / BEAST / B2ST SOOMPI OFFICIAL THREAD )miyachan11 : TWITTER & TUMBLR & YOUTUBE & NEW YOUTUBEavatar : seetwopm @ Livejournal; banner : babyseob @ Twitter
0

#13 User is offline   miyachan11 

  • ♥ 1990.01.05 ♥
  • Icon
  • Group: Moderators
  • Posts: 4,892
  • Joined: 14-October 07

Posted 10 October 2008 - 06:50 PM

anyone in here taking programming.
i need help right now T_T
Posted Image( 비스트 / BEAST / B2ST SOOMPI OFFICIAL THREAD )miyachan11 : TWITTER & TUMBLR & YOUTUBE & NEW YOUTUBEavatar : seetwopm @ Livejournal; banner : babyseob @ Twitter
0

#14 User is offline   AiMango 

  • honeypunch.
  • Pip
  • Group: Members
  • Posts: 2,104
  • Joined: 07-June 08

Posted 11 October 2008 - 07:25 PM

im takin it.. im good w/ c++ : )
0

Share this topic:


Page 1 of 1

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users