当前位置:天才代写 > JAVA代写,java代考-JAVA作业代写免费Moss检测 > Java loops代写 Assignment代写 Java loops代写 Programs代写

Java loops代写 Assignment代写 Java loops代写 Programs代写

2021-03-22 17:04 星期一 所属: JAVA代写,java代考-JAVA作业代写免费Moss检测 浏览:1227

Java loops代写

Concordia University COMP 248 – Winter 2019

Java loops代写 It is quite common at that time of the semester where you start speculating what grade you are going to get in a particular course

Assignment 3

Due Date: By 11:55pm March 22, 2019

Evaluation: 6% of final mark (see marking rubric at the end of handout)

Late Submission: none accepted

Purpose: The purpose of this assignment is to help you learn Java loops, control flow statements: if, if/else, switch, and creating a simple class. Java loops代写

CEAB/CIPS Attributes: Design/Problem analysis/Communication Skills

General Guidelines When Writing Programs:

  • Refer to handout of assignment1
Java loops代写
Java loops代写

Question 1  Java loops代写

It is quite common at that time of the semester where you start speculating what grade you are going to get in a particular course and how that grade will affect your GPA. This assignment will help you and your friends to do just that. In this assignment, you will create a GPA calculator for an undergraduate Concordia student. Java loops代写

The letter grades and their weights the program must support are:

 

 Java loops代写
Java loops代写

The program will start by asking the user about his/her current GPA and the number of credits he/she has accumulated so far.

If the student is a new student, then he/she will enter 0 for the number of credits and the program will NOT ask the student about his/her current GPA since that question would be considered useless.

 Java loops代写
Java loops代写

Here you are an example of a run with all valid data:

 Java loops代写
Java loops代写

The program, will display the above menu, once it has gotten:

  1. the total number of credits the student has achieved sofar
  2. the student’s currentGPA
  3. The courses the student is currently taking. These are the courses the student wants to check their effect on his/herGPA  Java loops代写

When menu option 1 is chosen, the following will be displayed:

 Java loops代写
Java loops代写

So, the point of option number 1 is to display the info given to the program When the user chooses option 2, the new GPA is calculated and displayed.

Notice here that the menu option keeps displaying after executing each option. The calculation formula for the new GPA is as follows:

x = (current GPA * total number of credits achieved so far) + ∑ (weight of grade *course credit) for all current courses)

y = total number of credits achieved so far + ∑ (course credit) for all current courses

New GPA = x/y

For example, for the above example,

x= (4.0*120) + (4*3) + (3*3) + (4*3) = 513 y= 120 + 3 + 3 + 3 = 129

New GPA = 513/129 = 3.976

When the user chooses option 3 ,

a list of the current courses will be listed and the user will be asked to choose the course number of the course to be deleted.

 Java loops代写
Java loops代写

After the deletion of course number 2, you can see the effect of that on the GPA:

Option 4 is used to add a course:

 Java loops代写
Java loops代写

After adding this 6 credit course with a letter grade of D, we can check the effect of that on the GPA

Option 5, will make the program terminate.

There are lots of data validations that have to be done: Here you are some examples:

  1. Numberof credits accumulated so far must be greater than or equal to 0; it can not be a negative number
 Java loops代写
Java loops代写

2.Current GPA has to be between 0 to 4.3inclusive

  1. Number of courses to add to the system has to be greater than0
 Java loops代写
Java loops代写
  1. Number of credits of a course has to be greater than0

  1. Letter grade has to be a validone
 Java loops代写
Java loops代写
  1. The chosen menu option has to be between 1 and 5inclusive

Some technical requirements you must abide by:

  1. Use a switch/case statement to handle the menu
  2. Use one array to store the added coursenames
  3. Use one array to store the added coursecredits
  4. Use one array to store the added course lettergrades
  5. Use a constant for the maximum number of courses the system cansupport
  6. If the user tries to add more courses, display an errormessage

Question 2  Java loops代写

Create a simple class Course with its accessors, mutators, and toString methods. There should only be a default constructor. The data members of the course class are as follows:

name € which is a string credits € which is a double letterGrade € which is a string

Two constructors are needed: a default one and a parameterized one. Java loops代写

The toString method when called, it should return a string representation of the course object in the following format:

Course name: <name> Number of credits: <credits> Grade: < letterGrade>

where < name>, < credits> and < letterGrade> are the content of the attributes of the object. Java loops代写

Create a driver class to test the course object. In the driver class, you need to instantiate three Course objects for the following three courses and then the toString method to display the content of each one of them.

  1. COMP248, 3.5 credits, A+ 2. COMP232, 3,B
  2. MATH123, 4, B+

The output of the driver class, should be:

Course name: COMP248 Number of credits: 3.5 Grade: A+
Course name: COMP232 Number of credits: 3 Grade: B
Course name: MAHT123 Number of credits: 4 Grade: B+

Submitting Assignment 3 Java loops代写

You will have 3 .java files to submit.

Please check your course Moodle webpage on how to submit the assignment.

Evaluation Criteria for Assignment 3 (20 points)

Source Code  
Comments for all 2 questions (3 pts.)  
Description of the program (authors, date, purpose) 1 pt.
Description of variables and constants 1 pt.
Description of the algorithm Java loops代写 1 pt.
Programming Style for all 3 questions (3 pts.)  
Use of significant names for identifiers 1 pt.
Indentation and readability 1 pt.
Welcome Banner/Closing message 1 pt.
Question 1 (11 pts.)  
Prompting user/reading data 1 pt.
Data validation 2 pts.
Handling menu options (switch) 2 pts.
The add function 1 pt.
The delete function  Java loops代写 2 pts.
Proper calculation of GPA 2 pts.
The display function 1 pt.
Question 2 (3 pts.)  
Develop the class,constructor, accessors, mutators, and

toString

2 pts.
The driver class 1 pt.
TOTAL 20 pts.
Java loops代写
Java loops代写

其他代写:algorithm代写 analysis代写 app代写 assembly代写 assignment代写 C++代写 C/C++代写 code代写 course代写 dataset代写 finance代写 java代写 source code代写 java代写 web代写 作业加急 北美代写 北美作业代写 数据分析代写 编程代写 考试助攻

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

 

天才代写-代写联系方式