New

Learn smart - Learn online. Upto 80% off on courses for a limited time. View Courses

Securing Higher Grades Costing Your Pocket? Book Your Assignment at The Lowest Price Now!
loader
Add File

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!

Stuck on Your Question?

Get 24x7 live help from our Top Tutors. All subjects covered.

loader
250 words

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Students Who Viewed This Also Studied

13 Pages
CST2550 Software Engineering Management and Development

Brief Task Description You are required to design and implement a stock management system for a small music shop. You should use UML diagrams to design the software. You should use Git to version con ...

Subject

Programing

University

Middlesex University

4 Pages
CS301 Data Science

We want to estimate this parameter using Maximum Likelihood Estimation Simulate 100 visits to your youtube channel, assuming that they will a Poisson distribution with a mean of 10 visits per minute. ...

Course

CS301

Type

Programming

Subject

Programing

University

Adler University

27 Pages
ITEC313 Object Oriented Programming

Question: River Crossing, Game Programming Problem Description One day a farmer goes to the market, taking with him a cabbage and a goat. On the way he captured a wolf, he’s a mighty farmer, ...

Course

ITEC313

Subject

Programing

University

Australian Catholic University

0 Page
Searching Algorithms

...

Course

COMP6211

Subject

Programing

University

Toi Ohomai Institute of Technology

Season

Spring

PROG1815 Programming Concepts

Question

Answered

Question  :

String Manipulation & Input Validation (60 marks)

This assignment is an exercise in validating user input and using string manipulation to edit and reformat input into a preferred format.  Some fields have patterns, some expect numeric values … possibly with limits.  Some fields are required (and cannot be just spaces), some are optional or conditionally optional, some will cause abends if null is not expected.  Some strings need to be trimmed of leading and trailing blanks, shifted to upper- or lower-case or capitalized.

Create a Validation Helperclass with the following static methods:
 
Capitalize– this takes a string parameter and returns a string.  It should convert an incoming null string to an empty one, trim any leading & trailing spaces, shift it to lower case and then capitalize each word in the string. Beware of 1-letter words.
 
You must implement this method fully yourself - i.e. do not use an existing method for this task.
 
this takes a string and returns a Boolean.  If the incoming string is null or an empty string, return false. Otherwise, return true only if the string’s entire content matches the Canadian postal pattern “A2A 2A2” … accept upper or lowercase, with or without the single space.
 
IsValidProvinceCode– this takes a string and returns a Boolean.  If the incoming string is null or an empty string, return false.  Otherwise, return true only if the string matches one of the valid 2 letter province or territory codes.
 
this also takes a string and returns a Boolean.  If the incoming string is null or empty, return false. Otherwise, return true only if the entire string fits the phone pattern “123-123-1234”, with or without the dashes.
 
Create aform that allows users to book Car Maintenance appointments. The focus is on validating user input and reformatting it when it isn’t in the preferred format. The following screenshot illustrates what the form should look like:

Buttons:

    1. “Pre-fill” loads the form with some validdata … making it easier to test individual field errors.
    2. “Book appointment” edits and reformats the fields back onto the form.
    3. All validation errors are displayed together on the form in a red label towards the bottom of the form,one line per error, and set the focus to the first field in error.
    4. “Reset” resets the form to its original state, namely: all fields blank except Appointment date which defaults to the current date.
    5. “Close” closes the form.
Perform the following validations (all fields are optional unless specified otherwise).  All error messages are to be shown at once, one line per error, and focus should be moved to the first field in error.
The customername is required and cannot be just blanks.
 
If an email is provided, the postal information (address, city, province code, and postal code) is optional.  If email is not provided, the postal information is required.  All four are fine, but not mandatory, whenan email is provided.
 
The province code, if provided, must be exactly two letters, not just two characters, and must match a valid Canadian province or territory code.  Accept upper- and lowercase.
 
1. Use your IsValidProvinceCodemethod to verify the province code.
2. Use your IsValidPostalCodemethod to verify the postal code, if one is provided.
3. Either a home or cell phone must be provided … both are fine, but not mandatory.  
4. Use your IsValidPhoneNumbermethod to verify the phone number(s).
5. The email must be a valid email pattern if provided. Note, there’s a MailAddress class in the Net.Mail 6.namespace that throws an exception when instantiatedwith an invalid email address.  There’s also a plethora of indecipherable regular expressions out there.
7. Make & model is required and cannot be just blanks.
8. Year is optional but, if present, must be a valid integer value between 1900 and the current year plus one. For example, if the current year is 2021, then a valid year is any number between 1900 and 2022 inclusively.
9. The appointment date is required and cannot be in the past.

Perform the following data conversions

a. Use your Capitalize method to capitalize the customer’s name, the address, make & model, and city.  It should not abend if any of these are null/empty.
b. Shift the province code to uppercase.
c. Shift the postal code to upper case and insert a single space if there isn’t one already.
d. Insert the dashes into the phone numbers, if they are not there already.
e. Shift the email to lowercase (it’s still valid, but easier to use for comparisons).
f. Display the date in the format shown.

What to hand in?

Bundle and upload your solution folder to the assignment drop-box on eConestoga as a single zip file. You may submit multiple versions but only the last (i.e.most recent) submission will be looked at and graded.

How will it be graded?

Please see the marking sheet that accompanies the assignment. It will be used to calculate your grade so be sure that you are meeting all the criteria included there. Please ensure that you submit only your own work! Remember - all your code submissions will be run through MOSS, the software plagiarism detection tool.

PROG1815 Programming Concepts

Answer in Detail

Solved by qualified expert

Get Access to This Answer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

27 More Pages to Come in This Document. Get access to the complete answer.

MyAssignmenthelp.com is one of the leading urgent assignment help providers in the USA. We have earned our reputation as best assignment help in multiple countries including the USA. We have designed unique fastest delivery options, which assist us to deliver immediate assignment assistance. Our teams of highly skilled qualified writers are capable of delivering fast assistances. We provide online assignment help to a wide range subjects so that whenever students face the urgent need of assignment help, they can hire our assistance within a short period.

More Prog1815 PROG1815 Programming Concepts: Questions & Answers

Q
icon

We aren't endorsed by this University

CST2550 Software Engineering Management and Development

Brief Task Description You are required to design and implement a stock management system for a small music shop. You should use UML diagrams to design the software. You should use Git to version control the software with regular commits and a repository on BitBucket. There should be multiple class ...

View Answer
Q
icon

We aren't endorsed by this University

CS301 Data Science

We want to estimate this parameter using Maximum Likelihood Estimation Simulate 100 visits to your youtube channel, assuming that they will a Poisson distribution with a mean of 10 visits per minute. Plot the arrival time vs visitor index. NOTE: To do this task make sure you read carefully the secti ...

View Answer
Q
icon

We aren't endorsed by this University

ITEC313 Object Oriented Programming

Question: River Crossing, Game Programming Problem Description One day a farmer goes to the market, taking with him a cabbage and a goat. On the way he captured a wolf, he’s a mighty farmer, and took it with him to the market. They came to a river. And on the Bank, there’s a boat. Now ...

View Answer
Q
icon

We aren't endorsed by this University

Searching Algorithms

...

View Answer

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the content removal request.

Choose Our Best Expert to Help You

5% Cashback

On APP - grab it while it lasts!

Download app now (or) Scan the QR code

*Offer eligible for first 3 orders ordered through app!

screener
ribbon
callback request mobile
Have any Query?