The Student Room Group

Newbie Coders Chat

Scroll to see replies

Original post by 571122
Well, when I was finishing up my Computer Science degree, I actually took interest in writing and social media.. which I took a degree in and excelled at because it favors my artistic side more (I'm an artist). I completed those two at the same time. :smile: You can't just have a one-directional way in life, you know? You have to expand your interests and live.

Well, it's not an enhanced computer science degree, that would be a Masters; it's just that, a Bachelors. Bachelor degrees don't consist of just the basic computer science courses, you know, they also require general knowledge (hence all the extra courses), which is exactly what distinguishes it from a community college degree, which is completely specified and one-directional.

I've had a lot of experience in life, as you may know, and I also did drama in high school, music, drawing, printing press, marketing, art, pointillism, still life, ,.. Ah yes, we used SPSS in our stats101 class. :smile: In high school, I also did a second specialization next to the general one, which was 'sports school', which included First Aid and olympic sports.

Would you like to tell me why you have this drive for competition? I tell you my life and my results out of passion but you seem to be fetching for approval.. it's not very friendly, you know? If you want my help, then I suggest you apologize for your gloating.. Come on man, what's that about? "I have a wife and kids and I trump you"? What the heck..

Also sorry if i sounded/actually was rude. I didn't mean it okay?
Original post by john2054
Also sorry if i sounded/actually was rude. I didn't mean it okay?

Yeah, no problem.
Original post by john2054
I can even trump Ronald himself, with the fact that i had, and to quote my psychiatrist, acute chronic schizophrenia, you know the kind criminals have, and i got better from that as well.

The fact that you have graduated means that you are my peer. True you know a lot more about coding than me, but we all have different strengths and weaknesses. To be honest my marriage is a bit like the stock markets, one minute it is going well, and the next it is peaking on collapse. What state are you from btw? Thanks to f.b. i have had a few close american friends, over the past few years or so.

By the way, John, I'm not actually good at coding, I just know the basics. I may appear to be good at coding from a beginner's perspective, but those skills didn't fall into my lap either, you know? I had to study really hard to have all that knowledge and practice into my head.
Original post by 571122
By the way, John, I'm not actually good at coding, I just know the basics. I may appear to be good at coding from a beginner's perspective, but those skills didn't fall into my lap either, you know? I had to study really hard to have all that knowledge and practice into my head.


Sure thing.
Original post by 571122
By the way, John, I'm not actually good at coding, I just know the basics. I may appear to be good at coding from a beginner's perspective, but those skills didn't fall into my lap either, you know? I had to study really hard to have all that knowledge and practice into my head.


Can you help me with this problem 571?? http://codingbat.com/prob/p174148

Thanks again.
Ok, took me 5 minutes to make. My coding skills are rusty, so I cheated a little bit by looking online for a similar solution and I inspired myself off that:
http://codingbat.com/doc/java-string-substring.html

The first thing I did was looked at the java language documentation, then for some online examples of the API.
It helped breaking down the problem and thinking in little pieces.

Here's the result:


and here's the code:
public String nTwice(String str, int n) {
int stringLength = str.length();
String firstChars = str.substring(0,n);
String lastChars = str.substring(stringLength-n);
return firstChars+lastChars; }
I have to take off now, so I'll read your replies tomorrow. Good day!
Original post by 571122
I have to take off now, so I'll read your replies tomorrow. Good day!


here is my latest task:
emailv2.png

here is the code i have so far: It is very messy atm sorry:

import java.util.Scanner;public class EmailGenerator { String firstQuestion = "What is your first name?"; String secondQuestion = "What is your second name?"; String firstChar = firstName.substring(0,1); String fullName = secondName.substring(0,stringLength); String a "derby.ac.uk"; public class makeUserName { String firstChar + fullName;} Scanner s = new Scanner(System.in); void sayName() { System.out.println(firstQuestion); } String firstName=s.nextLine(); void sayName() { System.out.println(secondQuestion); } String secondName=s.nextLine(); public string makeEmail(makeUsername("at":wink:+a){} EmailGenerator makeEmail = new EmailGenerator(); System.out.println("This user's email is: " +makeEmail+ );} public static void main(String[] args) {}; }

Good luck with this!
Original post by 571122
I have to take off now, so I'll read your replies tomorrow. Good day!


Here are the other assignments i have:
A class called GiveChange is provided below. The design of this class is to take a decimal amount from the user representing the change due to them from a purchase, and return the number of quarters, dimes, nickels and pennies that should be given to the user to make that total.The main method has been defined for you, and utilizes four static methods: getQuarters, getDimes, getNickels, and getPennies. Each method takes the total change in pennies (i.e., $3.80 = 380 pennies). As the denomination gets smaller, additional parameters are added to represent the number of quarters, dimes and nickels that minimize the change returned.Write the method definitions for getQuarters, getDimes, getNickels, and getPennies.

/* author your_name*/import java.util.Scanner;public class GiveChange { /** param p number of pennies * return number of quarters */ public static int getQuarters(int p) { //TODO: method definition for getQuarters } /** param p number of pennies * param q number of quarters * return number of dimes */ public static int getDimes(int p, int q) { //TODO: method definition for getDimes } /** param p number of pennies * param q number of quarters * param d number of dimes * return number of nickels */ public static int getNickels(int p, int q, int d) { //TODO: method definition for getNickels } /** param p number of pennies * param q number of quarters * param d number of dimes * param n number of nickels * return number of leftover pennies */ public static int getPennies(int p, int q, int d, int n) { //TODO: method definition for getPennies } public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("How much change is to be given?"); double change = s.nextDouble(); int pennies = (int)(change * 100); int q = getQuarters(pennies); int d = getDimes(pennies, q); int n = getNickels(pennies, q, d); int p = getPennies(pennies, q, d, n); String str = String.format("The customer should recieve %d " + "quarters, %d dimes, %d nickels, " + "and %d pennies.", q, d, n, p); System.out.println(str); }
Original post by 571122
I have to take off now, so I'll read your replies tomorrow. Good day!


and this:
Write a complete Java class called RemoveIt, which has one class variable, a constructor that takes a single argument, and one class method. These should behave as specified below.Class variable:

A String, used to hold a sentence to manipulate

Constructor:

Take a String as a parameter, and assigns its value to the class variable

Class method:

Take a String as a parameter, and return a new String that removes the first instance of the parameterString from the class variable.

As an example, if the argument is "cat", and the class variable stores "A kittycat is at the door", then the class method should return "A kitty is at the door".

As a second example, if the argument is "d", and the class variable stores "Candy is bad for your teeth", then the class method should return "Cany is bad for your teeth".

Note, for the purpose of this question, you can ignore the case where the parameter String does not appear in the class variable. This involves material we'll look at in Topic 3.

/** @author your_name*/ public class RemoveIt { //TODO: instantiate class variables /** @param sentence String to manipulate */ public RemoveIt(String sentence) { //TODO: constructor definition } /** @param toRemove String to remove from sentence * @return manipulated String */ public String remove(String phrase) { //TODO: remove definition } }
Original post by 571122
I have to take off now, so I'll read your replies tomorrow. Good day!


Sorry if that is a lot of work which i have just loaded you with 571, but i only have til monday to complete these tasks, and i really don't think i can do it on my own??!
Where's my "thank you" for the effort of the previous assignment?
Original post by 571122
Where's my "thank you" for the effort of the previous assignment?


thankyou thankyou thanksyou, there you got three.
Original post by john2054
thankyou thankyou thanksyou, there you got three.

As long as you mean it.
Original post by 571122
As long as you mean it.


I do mate. Listen yes, i'm sorry for being a ****head with you earlier, but i was just messing around. Also i am way out of my depth with this programming. I have just done a quiz which only had one chance to get it right, and i got something like 3/10. As i said i haven't done programming for a loonng time, and i don't think that it is right that they advertised this as something available for beginners.

I have til monday to pass these projects, so hopefully if you can help me with them in the next day or so, then i can make sure the answers pass, this will be a big help. And I can pay you for this as well, if you like?

Thanks again John.
Original post by john2054
I do mate. Listen yes, i'm sorry for being a d*head with you earlier, but i was just messing around. Also i am way out of my depth with this programming. I have just done a quiz which only had one chance to get it right, and i got something like 3/10. As i said i haven't done programming for a loonng time, and i don't think that it is right that they advertised this as something available for beginners.

I have til monday to pass these projects, so hopefully if you can help me with them in the next day or so, then i can make sure the answers pass, this will be a big help. And I can pay you for this as well, if you like?

Thanks again John.

It's all fine, payment not required. I'm working on the exercises right now.
Here's my big piece of advice: read a book on Java. Perhaps this book will be good for you because it explains things in a simple manner. Practice alone isn't sufficient, as you've noticed. You need the theoretical background, mate.
A very excellent book for coders (new and experienced): Code: The Hidden Language of Computer Hardware and Software

Does a brilliant job of explaining the very fundamentals of programming and computers in general - well worth a read.
Original post by john2054
here is my latest task:
emailv2.png

here is the code i have so far: It is very messy atm sorry:

import java.util.Scanner;public class EmailGenerator { String firstQuestion = "What is your first name?"; String secondQuestion = "What is your second name?"; String firstChar = firstName.substring(0,1); String fullName = secondName.substring(0,stringLength); String a "derby.ac.uk"; public class makeUserName { String firstChar + fullName;} Scanner s = new Scanner(System.in); void sayName() { System.out.println(firstQuestion); } String firstName=s.nextLine(); void sayName() { System.out.println(secondQuestion); } String secondName=s.nextLine(); public string makeEmail(makeUsername("at":wink:+a){} EmailGenerator makeEmail = new EmailGenerator(); System.out.println("This user's email is: " +makeEmail+ );} public static void main(String[] args) {}; }

Good luck with this!

Solution here:
http://pastebin.com/YTga7pAg
Original post by jungle_ninja
A very excellent book for coders (new and experienced): Code: The Hidden Language of Computer Hardware and Software

Does a brilliant job of explaining the very fundamentals of programming and computers in general - well worth a read.

Ah, another one to add to my shelf for later reading. Thanks. :smile:
Reply 299
Ask questions John you need to understand that code or you will never catch up.

Quick Reply

Latest

Trending

Trending