Need Help with java ASCII art - can anyone try this and then talk me through it. Please and Thanks:D
17 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./close
or theClose Post
button 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.