Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Write a PhoneNumber class that gets initialized with a 10-digit phone number. In the call PhoneNumber.new(ph), the input ph take any of these possible formats:
- a 10-digit integer - a string of 10 digits - (ddd) ddd-dddd where d is any digit [parenthesis format] - ddd-ddd-dddd where d is any digit [hyphen format]
Wherever whitespace appears in a string format, we can have a string of zero or more whitespace characters (including before and after the string as a whole). A PhoneNumber object responds to the to_s message which returns the number as a string in parenthesis format, and the area_code, prefix, and root messages which return the parts of the number in string format, as illustrated here:
a = PhoneNumber.new(1234567890) puts a # (123) 456-7890 puts a.area_code # 123 puts a.prefix # 456 puts a.root # 7890 puts PhoneNumber.new(' 7778889999 ') # (777) 888-9999 puts PhoneNumber.new(' (555)444-3333') # (555) 444-3333 PhoneNumber.new('1234') # ArgumentError: Improper phone number syntax PhoneNumber.new('(12) 333-4444') # ArgumentError: Improper phone number syntax PhoneNumber.new('123- 456- 7890') # ArgumentError: Improper phone number syntax
Write a program which randomly fills in 0s and 1s into TicTacToe board, prints board.
Design and implement an application that reads an arbitary number of integers that are in the range of 0 to 50 inclusive and counts how many occurences of each are entered.
On a 3 x 4 chessboard there are 3 black knights (B B B) and 3 white knights (W W W). Exchange knights in the minimum number of turns (hint: use graph representation).
Write a Little Man program that adds a column of input values and produces the sum as output. An input value of zero will indicate the last value in the input stream of input values.
Study the concept of inheritance and the object hierarchy in object-oriented programming, and write a paper comparing these concepts with the concept of inheritence.
Write a program to display the words in a list box sorted by the number of different vowels(a,e,i,o,u) in the word.
Explain what does it mean to say that programming language is machine independent? What do you mean by operator precedence? Depending on operator precedence, what values could be related with expression 6 + 2 * 3?
You will implement the calculator using stacks and queues. Your calculator should support following operators: Parenthesis. The input will be given in form of infix expressions, e.g. ( 2 + 3 ) * 5.
Write a script in fedora 10 that will automate a complex system task. The task I have chose is one that will determine the processes that are consuming system resources.
Intergalactic Navigation. Provide a graphical view of the planets and bases, and meteorite fields and display the requested path from start to destination.
Write a 3-page paper about inheritance structures of Galaga. Recognize the parent and child classes and describe what each class has for events and data.
Write down the program which uses the recursive method to replace all occurrences of character with another character in given sentence.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd