2014 Skillsusa ocean County nj computer programming contest



Download 26.76 Kb.
Date10.06.2017
Size26.76 Kb.
#20266

2014 SkillsUSA - Ocean County – NJ COMPUTER PROGRAMMING CONTEST

January 25, 2014
Scope of the Contest
Instructions to help you with the contest:
This contest consists of project coding and output, a written quiz, and an interview. This packet includes the written test and instructions for two projects. The project specifications are written for Visual Basic .NET or Java. Projects will be saved to the desktop and burned to a CD.
All necessary software is already installed on the computers in the lab. Computers are subject to inspection. Contestants will complete projects from scratch. Contestants found with pre-written partial or complete programs will be disqualified. Contestants may use a textbook or the Internet for reference. The State and National contests will NOT allow online reference.
Contestants will complete a true-false and multiple-choice written test.
Contestants will be interviewed sometime during the contest.
Each contestant will receive a Contestant Number that will be used to identify the contestant and all work. The Contestant Number MUST appear on all work, including the written test and every program. Do NOT write your names anywhere – numbers only.
When a contestant has completed a project, print out the source code and the GUI screen. Make sure the Contestant Number is on all work. Place the printed output UPSIDEDOWN on the judge’s desk. (Use [alt][prtscr] to capture the screen image and paste into a Word document then print)
Questions: Programming questions will NOT be answered. Technical questions MAY be answered, at the judge’s discretion. An answer supplied to one contestant will also be supplied to the entire group.
Consistency is very important. Each judge will judge each program. Contestants will be asked to demonstrate the program for the judges.
If a contestant has a problem with the computer or compiler, ask for help immediately.
When a contestant has completed a project it can be submitted and graded while they work on the next program.
Contest Problem #1
Title: Anagrams
Write a program to say if two input words are anagrams.
An anagram is a word or phrase made by transposing the letters of another word or phrase. Let's consider only words written with lower case letters and no punctuation. With this convention, some examples of anagram pairs are:
green genre

rat tar


rustic citrus
Note that each letter must be used once and only once. For example, “red" and “reed" are not anagrams.
The program should be “case insensitive”, meaning capital “A” and small “a” are considered the same letter, so “Dam” and “Mad” are true anagrams but “Adam” and “Made” are not.
Objective:

Design and code a program to allow the user to enter two words and then ask the computer to determine if the two words are anagrams.


Go slow. Remember: Input, Process, Storage, Output. Design your input first, figure out where to store your values, run your process, and then show your output.


Sample Input:

Sample Input:

Correct Output:

Pears

Spare

True

Dog

Alligator

False

Horse

Shore

True


Contest Problem #2
Title: On Being Superb
A positive integer number is superb if and only if the sum of all its divisors (excluding itself) is greater than the number.
Examples:


Number

Divisors

Total

Superb?

12

1 + 2 + 3 + 4 + 6

16

True

18

1 + 2 + 3 + 6 + 9

21

True

24

1 + 2 + 3 + 4 + 6 + 8 + 12

36

True

100

1 + 2 + 4 + 5 + 10 + 20 + 25 + 50

117

True

4

1 + 2

3

False

15

1 + 3 + 5

8

False

Go slow. Remember: Input, Process, Storage, Output. Design your input first, figure out where to store your values, run the process, and then show your output.


Objective:

Write a program to determine if an input number is Superb.

Input will be a positive integer n in the range 2 through 100.

Output should be the original number plus either "True" or "False".




Sample Input:

Correct Output:

12

True

4

False

15

False

24

True


Download 26.76 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page