Starting from:

$30

Assignment #1: Introduction to Programming

Page    1 of    3
CSC    110:    Fundamentals    of    Programming    I

Assignment    #1:    Introduction    to    Programming


How    to    hand    in    your    work
Submit    the    requested    files    for    parts    (b)    and    (c)    (see    below)    through    the    Assignment    
#1    link    on    the    CSC    110    conneX    site.    Please    make    sure    you    follow    all    the    required    
steps    for    submission    (including    final    confirmation    of your    submission).    Part    (a)    is    
not    marked.
Marking
Your    mark    will    be    based    on:
• Your    code    compiling    and    running.
• Your    code    producing    the    output    exactly    as    requested,    and    calculating the    
object’s    dimensions    correctly.
• Your    code    indented    and    appropriately    documented via    comments.    (Please    
follow    the    guidelines    in    codingConventions.pdf available    in    the    “Lectures    
&    stuff”    section on    conneX.)
Part    (a):    Problems    from    the    Textbook
Complete    the    Chapter    1 Self-Check    Problems    1    to    20 and    compare    your    answer    to    
those    given    by    the    textbook    authors    at:
http://www.buildingjavaprograms.com/self-check-solutions-4ed.html
Page    2 of    3
Part    (b):    ASCII    Art
With    the    US    Presidential    lection,    we    can    set    aside    our    Canadian    misgivings    about    the    
whole    Clinton    vs.    Trump    thing    by    instead    using    Java    to    draw    the    national    bird    of    the    
United    States    of    America.    To    that    end    you    will    write a    Java    program    to    create    an
ASCII-art    version    of    an    eagle.
 /
\ /*/
\\\' , / //
 \\\// _/ //'
 \_-//' / //<'
 \*/// <//'
 / >> *\\\`
 /,)-^>> _\`
 (/ \\ / \\\
 // //\\\
 ((
This    might    bird    looks    best    when    your    terminal    uses    a    monospaced    font    such    as    
Courier.    It is    composed    of    the    following    characters:    space,    comma,    asterisk,    forward    
slash,    backslash,    backtick    (`),    underscore    (_),    asterisk    (*),    parentheses, single    quote    
('), and    the    hyphen (|).
File    to    submit:    AsciiEagle.java
Part    (c):    Math    calculations
Write    a    program    to    calculate    the    surface    area    of    the    cathedral    floor    shown    below.
Write    your    program    in    several    steps:
B
A C
chancel
nave
85 m
9 m
16 m
18 m
Page    3 of    3
• Write    a    statement    to    calculate    the    rectangular    area    of    the    nave    not    including    
the    chancel    or    the    four    chapels,    and    store    this    to    a    variable    called    naveArea.
• Write    a    statement    to    calculate    the    area    of    a    semicircle    corresponding    to    the    
chancel.    (Note    that    its    diameter    is    given    and    that    the    chancel    is    a    perfect    
semicircle.)    Store    this    into    a    variable    named    chancelArea.
• Write    a    statement    to    calculate    the    area    of    a    semicircle    corresponding    to    one    
of    the    smaller    chapels.    Note    that    chapels    B    and    C are    the    same    size.    Store    
chapel    areas into    variables named    chapelAreaSmall    (for    chapels    A)    and
chapelAreaLarge (for    chapels    B and    C).
• Write    the    lines    of    code    using    the    three    variables    created    above    to    calculate    
the    complete    area    of    the    cathedral    floor    and    print    it    out    to    the    console.
Note    that    you    should    choose    the    proper    primitive    type    for    your    variables    in    order    to    
get    a    precise    answer. You    may    use    Math.PI in    your    calculations.
File    to    submit:    FloorArea.java
Grading    scheme    
• “A”    grade:    An    exceptional    submission    demonstrating    creativity    and    initiative    
going    above    and    beyond    the    assignment    requirements.    The    two    programs    
run    without    any    problems    and    have    the    expected    output. Any    extra    work    
appears    in    the    files    named    AsciiEagleExtra.java and    FloorAreaExtra.java and    
identified within    the    files    (i.e.,    Class    comment) is    how you    have    extended    the    
assignment    to    demonstrate    creativity    and    initiative.
• “B”    grade:    A    submission    completing    the    requirements    of    the    assignment.    The    
two    programs    run without    any    problems and    have    the    expected    output.        
• “C”    grade:    A    submission    completing    most    of    the    requirements    of    the    
assignment.    The    programs    run with    some    problems    OR    only    one    program    
runs    without    any    problems    and    has    the    expected    output.
• “D”    grade:    A    serious    attempt    at    completing    requirements    for    the    assignment.    
The    two    programs    run    with quite    a    few    problems    OR    only    one    program    runs    
with    some    problems.        
• “F”    grade:    Either    no    submission    given,    the    submission    does    not    compile,    or    
submission    represents    very    little    work.