• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Need help to complete assignment

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anybody help in this?
Prompt the user for an integer which will define the number of groups in your table
Produce an ASCII table from 0 to 127
Your table will be organized into groups of three little columns displaying the same value as a character, in hexadecimaland in decimalvalue. So each number in the table is displayed three times
Each of the groups of little columns will be 8 characters wide and neatly aligned (see sample output below). The alignment has to be neat for values less than 6. What is shown is just an example.
Leave 4 blank spaces between groups.
When you have printed the number of groups defined by the user input start a new line and continue.
When you reach 127, stop printing regardless of which group you are in and print one extra newline character.
Your solution must employ a loop that goes from 0 to 127. Within the loop there must be a second control structure to determine when to start a new line when you have enough groups printed.
Include documentation readable by the javadoc utility suitable to a program of this size.
our documentation should include a general description of what this program does
 
author & internet detective
Posts: 41250
849
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kris,
How far did you get? For example, can you write a main method that prints a message to the user? That reads in that answer and stores it in a variable, etc.

Post how far you get and then someone will give you tips on what to do next.
 
Marshal
Posts: 76415
365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
…and welcome to the Ranch

Beware of some of the lower ASCII characters which are control characters; you can read about them here. Do tell us what happens for U+0007.
They were right to tell you to stop at 127; since ASCII occupies 7 bits, there is no such thing as an ASCII character for 128+.
 
Kris Patel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know about database and table, just a beginner so please help with this'
 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kris Patel wrote:Don't know about database and table, just a beginner so please help with this'



You do *not* need a knowledge of databases for this assignment.

When this assignment is referring to "table" (with "rows" and "columns"), it is referring to the output -- meaning how it is to be displayed. There is no database requirement.

Henry
 
Look ma! I'm selling my stuff!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic