CMPSCI111L
project1
Skip To Content
Dashboard
  • Login
  • Dashboard
  • Calendar
  • Inbox
  • History
  • Help
Close
  • My Dashboard
  • CMPSCI111L
  • Assignments
  • project1
2017FA
  • Home
  • Assignments
  • Syllabus
  • Quizzes
  • Collaborations
  • Library
  • The Learning Center
  • McGraw Hill Campus
  • Google Drive
  • Campus Resource Guide
  • EvaluationKIT Course
  • Online Tutoring
  • Services for Students
  • Employment Center
  • Office 365
  • Canyons Connects
  • Purchase Course Materials
  • Top Hat
  • Zoom
  • Lucid (Whiteboard)
  • Insights-Beta
  • Credentials
  • Insights

project1

  • Due Sep 8, 2017 by 11am
  • Points 30
  • Available Sep 2, 2017 at 12am - Sep 8, 2017 at 11:59pm
This assignment was locked Sep 8, 2017 at 11:59pm.

Computer Science 111 Intro to Algorithms and Programming: Java

Programming Project #1 – Simple Programming Exercises (30 points)


This project assumes you have followed the NetBeans instructions and can create and run a simple Java program using NetBeans. If you have NOT done this, STOP, go back and practice the NetBeans instructions.
Create a folder on your memory stick or your laptop hard drive for ALL your java projects. Something like 'e:\javaprojects' or 'c:\javaprojects', your drive letter may be different. If you are using the lab computer hard drive, you MUST email the code to yourself when you are done.


MyInitials: Create a NetBeans project named 'Project1'.
Create a main class with the name 'MyInitials'. In the main method insert print statements to display your initials (2-3 letters) using an 8 X 8 pattern. For example, here is an 8 X 8 pattern of the letter 'J':
J J J J J J J J J J J J It will take eight (8) print line statements to complete the exercise.


DisplayResult: DO NOT create another project, we are going to add a new file to 'Project1'. From the NetBeans 'File' menu select 'New File'. On the dialog box under 'File Type' select 'Java Main Class' and hit 'Next'. Create a main class with the name ‘DisplayResult’, verify it is part of 'Project1' and press 'Finish'. In the main method insert print statements to display the result of following expression.
(9.5 x 4.5 – 2.5 x 3)/(45.5 -3.5)
Do not use any variables, just print statement to display your results.


Chapter 2 - Week 2
Just a reminder, add your work to the 'Project1' folder. If you are using a memory stick or laptop you can run NetBeans and from the 'File' menu select 'Open Project", locate and open your 'Project1'. If you are using the lab computer hard drive, you MUST create 'Project1' from scratch, then copy and paste your existing code from your email.


FeetMeters: From the NetBeans 'File' menu select 'New File'. On the dialog box under 'File Type' select 'Java Main Class' and hit 'Next'. Create a main class with the name 'FeetMeters', verify it is part of 'Project1' and press 'Finish'. In the main method create code which converts feet to meters, using the formula:
1 foot = .305 meters // this is NOT Java, you create the Java You need to create two variables (inside main), and print the result of the calculation. At first, just assign a simple value to the variable feet. If you can get that to work, try to input the value of feet from the keyboard.


CalculateTip: From the NetBeans 'File' menu select 'New File'. On the dialog box under 'File Type' select 'Java Main Class' and hit 'Next'. Create a main class with the name 'CalculateTip', verify it is part of 'Project1' and press 'Finish'. In the main method create code which calculates and prints a tip amount and a total using the formulas:
tip = subtotal * tiprate; total = subtotal + tip; You need to create four variables (inside main), and print the results of the calculations (tip and total). At first, just assign a simple value to the variables. If you can get that to work, try to input the values from the keyboard.

NumberOfYears: From the NetBeans 'File' menu select 'New File'. On the dialog box under 'File Type' select 'Java Main Class' and hit 'Next'. Create a main class with the name NumberOfYears, verify it is part of 'Project1' and press 'Finish'. Write a program that prompts the user to enter the days and displays the number of years and remaining days. For simplicity, assume a year has 365 days.

You need to create three variables (inside main) and print the result.

APowerofB : From the NetBeans 'File' menu select 'New File'. On the dialog box under 'File Type' select 'Java Main Class' and hit 'Next'. Create a main class with the name APowerofB, verify it is part of 'Project1' and press 'Finish'. Write a program that calculates exponential values and displays following table. Cast floating-point numbers into integers.

a b pow(a,b)

1 2      1

2 3      8

3 4      81

4 5     1024

5 6     15625

1504893600 09/08/2017 11:00am
Please include a description
Additional Comments:
Rating max score to > pts
Please include a rating title

Rubric

Find Rubric
Please include a title
Find a Rubric
Title
You've already rated students with this rubric. Any major changes could affect their assessment results.
 
 
 
 
 
 
 
     
Can't change a rubric once you've started using it.  
Title
Criteria Ratings Pts
This criterion is linked to a Learning Outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 pts Full Marks blank
0 to >0 pts No Marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional Comments
This criterion is linked to a Learning Outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 pts Full Marks blank
0 to >0 pts No Marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional Comments
Total Points: 5 out of 5