Need Help with java ASCII art - can anyone try this and then talk me through it. Please and Thanks:D

27 Replies
⌛ This post has been reserved for your question.
Hey @StremesJ! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
@ponchisao326
hello again want a challenge
😄
hahhahah
let me check
tysm - dont worry if your busy tho
what do you have at the moment
?
nothing i got the void display {}
but like
switch case and doing ascii art is so hard
Can you pass the exercise itself through here
the plain text
ok
Program 4. Seven Segment Display (20%)
In the file SevenSegment.jsh, write a method with the signature:
void display(int n)
that, given a number, displays ASCII art of that number in the style of an electronic “seven
segment display”. For example:
display(28);
-- --
| | |
-- --
| | |
-- --
You may assume the number is a non-negative Java int.
Hints:
Use n % 10 to get the right-most digit of a number. For example, 123456 % 10 == 6.
Use n / 10 to chop off the right-most digit of a number. For example, 123456 / 10 ==
12345.
To help your program draw the ASCII art, you should use the following method that, given a
digit d and a line number n (from 1 to 5), returns a String representing line n of digit d.
This message has been formatted automatically. You can disable this using
/preferences.this?
yes, but if you can pass it through a document would be better
it's just because I can't see it that well on the photo
oki
give me 3 mins
okay
there you
go
ty
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.hi, very late but has this been solved? I don't have any clue on how to approach this
What exactly is your issue? Maybe open a new ticket and describe it there, noone will eat you for doing it 😄
Ngl If given a choice id just make an array of strings 0 thru 9 For the ascii art
Then just grab and print them based on each digit.
Ooh nvm I see why that don't work damn
It kinda does, like your idea is not bad, in general but i'd just modify it a little
well since they give you a function for printing part of the number per row, its prob easier to just create a String[] arr of length 5, and just concat each number row by row, then print the array 1 row at a time.

Fair
thats my plan anyway ...but @StremesJ might have already solved this by now
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.i had to edit the supplied function @StremesJ not sure if ur allowed to do that for your project tho. otherwise nothing lined up
