Chat with us, powered by LiveChat CIS 335 Week 2 ilab | Writedemy

CIS 335 Week 2 ilab

CIS 335 Week 2 ilab

Question

CIS 335 Week 2 ilab

Program files for the following program

  1. StudentGPAInfo
  2. CurrencyConversion

At the beginning of all your programs, put a comment box that includes the program name, your name, and a brief description of the program.

Example:

/***********************************************************************
Program Name: ProgramName.java
Programmer’s Name: Student Name
Program Description: Describe here what this program will do
***********************************************************************/

How to submit your assignment:

  1. The programsmusthave the same names as the assignment title.
  2. Each Java source file (*.java) must include a corresponding class file (*.class) program as evidence of success.
  3. In addition to the program source code files and byte code files, put all your program source code files and screen shots of your program output files into a Word document.
  4. You must use a zipped folder to send your weekly assignment to the Dropbox. Do not send subfolders within your zipped folder. Place all of the .java and .class files for the week into the one zipped folder. The zip folder should be named CIS355A_YourLastName_iLab_Week2, and this zip folder will contain all the weekly programming assignments.

Required SoftwareEclipse

Access the software at https://lab.devry.edu.
Steps: 1 and 2

Lab Steps

Step 1: StudentGPAInfo (20 points)

You will create a class to store information about a student’s courses and calculate their GPA. Your GPA is based on the class credits and your grade. Each letter grade is assigned a point value as follows:

A = 4 points
B = 3 points
C = 2 points
D = 1 point

Therefore, an A in a 3 unit class is equivalent to 12 grade points (4 for the A times 3 unit class)
A C in a 4 unit class is equivalent to 8 grade points (2 for the C times 4 unit class)
This is a total of 20 grade points. Your GPA is calculated by dividing the total grade points by the total class credits, so in this case:

20 grade points / 7 credits = 2.85 GPA

Create a class called StudentInfo that represents the following information (private data) about a student:

  • Student name
  • Total grade points
  • Total credits

Create the following public member functions. (Note that the program may not require all functions to be used, but they should all exist for a complete class.)

Default constructor to initialize grade points and credits

setName Set value for name

getName Returns the name

addClass receives as input the class units and grade, updates grade points and credits appropriately

getGPA Calculates and returns the GPA

displayStudent Displays all info about student. GPA should be displayed with 2 decimal places of precision (i.e., 3.25).

Note that ONLY student name will be “set” from the outside. The grade points and credits will be modified with the method addClass which takes as parameters the number of units for the class and the grade awarded. This method then adds the appropriate grade points to the total, and also adds the credits to the total.

Write a program to test the class as shown below. You should ask for the student’s name, then allow them to add multiple classes. When done, display the GPA. ALL INPUT SHOULD BE RECEIVED IN MAIN AND PASSED TO THE OBJECT. Use console input/output for this program (NOT JOptionPane).

Note that it will be easier to use String for the grade rather than char since Scanner does not have a method to easily return a char.

Sample Output:

Enter Student name: Joe Smith
Enter class credits: 3
Enter letter grade: A
Another class? y
Enter class credits: 4
Enter letter grade: C
Another class? n
Joe Smith, your GPA is 2.86
Press any key to continue

Grading Rubric

Standard header included 1 Must contain program’s name, student name, and description of the program
Lab Report 4 Documents your design process and testing
StudentInfo class with required methods 10 Methods correctly implemented
GPATest class, which drives the application, is created 5 A driver class with the main method. Input collected and passed to the object. Output displayed correctly
20

STEP 2: CurrencyConversion (20 points)

You must create a program named CurrencyConversion.java that converts money between the following currencies.

Given one of the three currencies (US Dollar, Yen, Euro), the program should convert the input amount into one of the other currencies. For example, if you input one (1) U.S. dollar, and you decide to convert that one dollar to a Euro, then the output should be .90.

This chart provides the codes to be used as input (JPY, EURO, USD) and the conversion factors.

CURRENCY CURRENCY CODE YEN EURO USD

US Dollar

USD $1 = 123.14 $1 = .90 Euro ————

Yen

YEN ————- 1 Yen = .0073 Euro 1 Yen = $.0081

Euro

EURO 1 Euro = 136.08 Yen ————

1 Euro = $1.11

Note that Step 2 DOES NOT HAVE TO USE OOP. Keep it simple.

Note that you CANNOT test for equality between strings using ==.
String color = “red”;

THIS WILL NOT WORK:
if (color == “red”)

YOU MUST USE
if (color.equals(“red”)
Using the JOptionPane GUI, do the following.

Prompt the user for the currency code type.

Prompt the user for the amount of that currency.

Prompt the user for the currency code that the entered amount must be converted to.

Using the table above, the following formula was used to convert USD to EURO.

100.00 USD * .9 = 90.00 EURO

Display the results in a JOptionPane message box.

1 Must contain program’s name, student name, and description of the program
4 Documents design process and testing
5 Use JOptionPane for input and output
7 Uses logic and correct formula to compute results
3 Gives error message, allows correction of invalid data
20

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order