Question: I'm having trouble with a coding lab. When I actually run the lab, the output looks perfect. I think the problem is that my instructor

I'm having trouble with a coding lab. When I actually run the lab, the output looks perfect. I think the problem is that my instructor wants them done a certain way.

This is the complete code that I have:

/** * * CSU Astrology: Rams for the Stars * * For this assignment, you are going to build 'business' cards for the * new CSU Astrology department. * * @author MARGOT NAFF * MGNAFF@STUDENT.RAMS.COLOSTATE.EDU * Computer Science Department * Colorado State University * @version 201990 */ public class Astrologer {

public static String getAstrologerName() { String getAstrologerName; getAstrologerName = "Margot Naff"; return getAstrologerName; } public static String getAstrologerEmail() { String getAstrologerEmail; getAstrologerEmail = "mgnaff@rams.colostate.edu"; return getAstrologerEmail; } public static String getBusinessCard(String name, String email) { System.out.println("+--------------------------------------+"); System.out.println("| CSU Astrology |"); System.out.println("| Rams for the Stars |"); System.out.println("| |"); System.out.println("| |"); System.out.println("| " + name + " |"); System.out.println("| " + email + " |"); System.out.println("+--------------------------------------+"); return ""; } public static String getAries() { System.out.println(); System.out.println(); System.out.println("+--------------------------------------+"); System.out.println("| **** **** |"); System.out.println("| * * * * |"); System.out.println("| * * * * |"); System.out.println("| * * * * |"); System.out.println("| * * |"); System.out.println("| * |"); System.out.println("| |"); System.out.println("| ===== ARIES ===== |"); System.out.println("+--------------------------------------+"); return ""; } public static String getLeo() { System.out.println("+--------------------------------------+"); System.out.println("| ***** |"); System.out.println("| * * |"); System.out.println("| * * |"); System.out.println("| *** * |"); System.out.println("| * * * |"); System.out.println("| *** ** |"); System.out.println("| |"); System.out.println("| ===== LEO ===== |"); System.out.println("+--------------------------------------+"); return ""; } public static String getSagittarius() { System.out.println("+--------------------------------------+"); System.out.println("| * * * * |"); System.out.println("| * * |"); System.out.println("| * * * |"); System.out.println("| * |"); System.out.println("| * * |"); System.out.println("| * |"); System.out.println("| |"); System.out.println("| ===== SAGITTARIUS ===== |"); System.out.println("+--------------------------------------+"); return ""; }

public static void main(String[] args) { System.out.println("======Part One======"); System.out.println(getAstrologerName()); System.out.println(getAstrologerEmail()); System.out.println(" ======Part Two======"); String astroName = getAstrologerName(); String astroEmail = getAstrologerEmail(); System.out.println(getBusinessCard(astroName,astroEmail)); System.out.println(" ======Part Three======"); System.out.println(getAries()); System.out.println(getLeo()); System.out.println(getSagittarius()); }

} I'm getting 2 problems with this;

The first is that I need to be able to test the business card with different names and emails(I think this means that the white spacing would be different with names and emails with a different number of characters, and I need to fix that error)

The second is a problem with all three have the astrology cards. They all have the same problem, the feedback says "There is a problem with the card name. Astrologer.getAries() incorrectly returned. I get the same message for all 3 astrology cards.

Any help with these problems would be greatly appreciated!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!